[PATCH] t/mysql_iso_level.t: be tolerant of a better-than-expected isolation level

Sam Vilain sam.vilain at catalyst.net.nz
Thu Sep 13 04:07:10 BST 2007


The test tests for 'READ COMMITTED' SQL transaction isolation level,
however at least on the Debian mysql-5.0 the default level is
'REPEATABLE READ', which is a stricter level.  So, include all of the
possible levels in the test.
---
 t/mysql_iso_level.t |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/t/mysql_iso_level.t b/t/mysql_iso_level.t
index 40e4d76..4b26cb3 100644
--- a/t/mysql_iso_level.t
+++ b/t/mysql_iso_level.t
@@ -15,6 +15,7 @@ SKIP: {
     my $dbh       = Smolder::DB->db_Main();
     my $iso_level = $dbh->selectrow_array('SELECT @@global.tx_isolation');
 
-    is( $iso_level, 'READ-COMMITTED', 'database isolation level' );
+    like( $iso_level, qr/READ-COMMITTED|REPEATABLE-READ|SERIALIZABLE/,
+          'database isolation level' );
     $dbh->disconnect();
 }
-- 
1.5.2.4



More information about the tapx-dev mailing list