[svn:dbi] r14896 - in dbi/branches/sqlengine: lib/DBI/DBD t

[email protected] Tue, 5 Jul 2011 00:14:23 -0700 (PDT)
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: REHSACK
Date: Tue Jul  5 00:14:23 2011
New Revision: 14896

Modified:
   dbi/branches/sqlengine/lib/DBI/DBD/SqlEngine.pm
   dbi/branches/sqlengine/t/49dbd_file.t

Log:
Fixing RT#69260


Modified: dbi/branches/sqlengine/lib/DBI/DBD/SqlEngine.pm
==============================================================================
--- dbi/branches/sqlengine/lib/DBI/DBD/SqlEngine.pm	(original)
+++ dbi/branches/sqlengine/lib/DBI/DBD/SqlEngine.pm	Tue Jul  5 00:14:23 2011
@@ -685,7 +685,7 @@
     my @tables = $dbh->func("get_avail_tables") or return;
     foreach my $ref (@tables)
     {
-        push @tables, $ref->[2];
+        push @table_list, $ref->[2];
     }
 
     return @table_list;
@@ -785,7 +785,7 @@
         my $n_req = @req_prm == 1 && ref $req_prm[0] ? $req_prm[0]->num : scalar @req_prm;
         unless ( $n_req == ( my $nparm = @$params ) )
         {
-            my $msg = "You passed $nparm parameters where $req_prm required";
+            my $msg = "You passed $nparm parameters where $n_req required";
             $sth->set_err( $DBI::stderr, $msg );
             return;
         }

Modified: dbi/branches/sqlengine/t/49dbd_file.t
==============================================================================
--- dbi/branches/sqlengine/t/49dbd_file.t	(original)
+++ dbi/branches/sqlengine/t/49dbd_file.t	Tue Jul  5 00:14:23 2011
@@ -122,6 +122,9 @@
 my @layer = grep { $_ eq "encoding($encoding)" } @tfhl;
 is (scalar @layer, 1, "encoding shows in layer");
 
+my @tables = $dbh->func( "list_tables" );
+is_deeply( \@tables, ["000_just_testing", $tbl], "Listing tables gives test table" );
+
 SKIP: {
     $using_dbd_gofer and skip "modifying meta data doesn't work with Gofer-AutoProxy", 4;
     ok ($dbh->f_set_meta ($tbl, "f_dir", $dir), "set single meta datum");