Subject: | DBD::mysql t/40blobs.t cannot pass without database access |
Originally reported by Yitzchak Scott-Thoennes at
http://bugs.mysql.com/bug.php?id=46122
Description:
See https://rt.cpan.org/Public/Bug/Display.html?id=45616
How to repeat:
cpan DBD::mysql
Suggested fix:
Adjust order of code in the test script.
Subject: | dbdmysql40blobs.patch |
--- DBD-mysql-4.012/t/40blobs.t.orig 2009-07-12 13:34:35.000000000 -0700
+++ DBD-mysql-4.012/t/40blobs.t 2009-07-12 13:35:52.000000000 -0700
@@ -29,20 +29,20 @@
}
my $dbh;
-my $charset= 'DEFAULT CHARSET=utf8';
eval {$dbh = DBI->connect($test_dsn, $test_user, $test_password,
{ RaiseError => 1, AutoCommit => 1}) or ServerError() ;};
-if ($dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1") {
- $charset= '';
-}
-
if ($@) {
plan skip_all => "ERROR: $DBI::errstr. Can't continue test";
}
plan tests => 14;
+my $charset= 'DEFAULT CHARSET=utf8';
+if ($dbh->get_info($GetInfoType{SQL_DBMS_VER}) lt "4.1") {
+ $charset= '';
+}
+
my $size= 128;
ok $dbh->do("DROP TABLE IF EXISTS $table"), "Drop table if exists $table";