From 40017ec5bda5c959cddc8658a508936468ed6411 Mon Sep 17 00:00:00 2001 From: Baron Schwartz Date: Mon, 4 Jun 2012 00:23:55 -0400 Subject: [PATCH] Skip utf8 tests when DBD::mysql less than 4.0 --- t/lib/Quoter.t | 16 +++++++++++----- t/pt-archiver/issue_1229.t | 4 ++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/t/lib/Quoter.t b/t/lib/Quoter.t index 2c742f37..e9d4866a 100644 --- a/t/lib/Quoter.t +++ b/t/lib/Quoter.t @@ -194,11 +194,17 @@ SKIP: { . "]"; $flat_string =~ s/\n/\\n/g; - is_deeply( - [ $q->deserialize_list($selsth->fetchrow_array()) ], - $serialize_tests[$test_index], - "Serialize $flat_string" - ); + # diag($test_index); + SKIP: { + skip "DBD::mysql version $DBD::mysql::VERSION has utf8 bugs. " + . "See https://bugs.launchpad.net/percona-toolkit/+bug/932327", + 1 if $DBD::mysql::VERSION lt '4' && $test_index == 9; + is_deeply( + [ $q->deserialize_list($selsth->fetchrow_array()) ], + $serialize_tests[$test_index], + "Serialize $flat_string" + ); + } } $sth->finish(); diff --git a/t/pt-archiver/issue_1229.t b/t/pt-archiver/issue_1229.t index 277144e7..cb47f23c 100644 --- a/t/pt-archiver/issue_1229.t +++ b/t/pt-archiver/issue_1229.t @@ -22,6 +22,10 @@ my $dbh = $sb->get_dbh_for('master'); if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } +elsif ( $DBD::mysql::VERSION lt '4' ) { + plan skip_all => "DBD::mysql version $DBD::mysql::VERSION has utf8 bugs. " + . "See https://bugs.launchpad.net/percona-toolkit/+bug/932327"; +} else { plan tests => 3; }