[Rt-commit] rt branch, 4.0/shredder-parent-link-and-transaction, created. rt-4.0.6-250-g7294559
Jim Brandt
jbrandt at bestpractical.com
Tue Jul 24 16:35:11 EDT 2012
The branch, 4.0/shredder-parent-link-and-transaction has been created
at 7294559229a37c9326cf067c352cf9826ba1d829 (commit)
- Log -----------------------------------------------------------------
commit 7294559229a37c9326cf067c352cf9826ba1d829
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue Jul 24 14:46:00 2012 -0400
Update table_info call to get back table data for test SQLite DB
The dump_current_and_savepoint function in shredder/utils.pl relies
on the table_info call from DBD::SQLite to return all of the tables in
the test RT database. The call was using empty strings as the first
two parameters, but instead of returning all tables, it returned none.
The first parameter is catalog which isn't supported in SQLite,
and the second, schema, seemed to be performing a LIKE and matching
nothing.
Based on the examples in the DBD::SQLite tests, passing undef
for the first two parameters and '%' for the third parameter, table,
returns all tables.
This change returns data for the test comparison and in
doing so reveals a failing test in t/shredder/01ticket.t
diff --git a/t/shredder/utils.pl b/t/shredder/utils.pl
index 5f5c182..187ae84 100644
--- a/t/shredder/utils.pl
+++ b/t/shredder/utils.pl
@@ -283,7 +283,7 @@ sub dump_sqlite
my $old_fhkn = $dbh->{'FetchHashKeyName'};
$dbh->{'FetchHashKeyName'} = 'NAME_lc';
- my $sth = $dbh->table_info( '', '', '%', 'TABLE' ) || die $DBI::err;
+ my $sth = $dbh->table_info( undef, undef, '%', 'TABLE' ) || die $DBI::err;
my @tables = keys %{$sth->fetchall_hashref( 'table_name' )};
my $res = {};
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list