From 276b3672975632af74ea8d9230e7a028ddcacf1d Mon Sep 17 00:00:00 2001 From: Zardosht Kasheff Date: Wed, 3 Nov 2010 15:04:50 +0000 Subject: [PATCH] [t:3006], fix tests to make them deterministic git-svn-id: file:///svn/mysql/tests/mysql-test@25143 c7de825b-a66e-492c-adef-691d508d4ae1 --- .../tokudb.bugs/r/checkpoint_lock.result | 24 ++++---- .../tokudb.bugs/r/checkpoint_lock_2.result | 60 +++++++++---------- .../suite/tokudb.bugs/t/checkpoint_lock.test | 6 +- .../tokudb.bugs/t/checkpoint_lock_2.test | 18 ++++-- 4 files changed, 57 insertions(+), 51 deletions(-) diff --git a/mysql-test/suite/tokudb.bugs/r/checkpoint_lock.result b/mysql-test/suite/tokudb.bugs/r/checkpoint_lock.result index 3beef3d7523..8cd61e59c2f 100755 --- a/mysql-test/suite/tokudb.bugs/r/checkpoint_lock.result +++ b/mysql-test/suite/tokudb.bugs/r/checkpoint_lock.result @@ -1,18 +1,18 @@ SET STORAGE_ENGINE = 'tokudb'; # Establish connection conn1 (user = root) -show processlist; -Id User Host db Command Time State Info -23 root localhost:53551 test Query 0 NULL show processlist -24 root localhost:53552 test Sleep 0 NULL +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Sleep 0 NULL +test Query 0 executing select DB, command, time, state, info from information_schema.processlist flush logs; -show processlist; -Id User Host db Command Time State Info -23 root localhost:53551 test Query 0 NULL show processlist -24 root localhost:53552 test Sleep 0 NULL +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Sleep 0 NULL +test Query 0 executing select DB, command, time, state, info from information_schema.processlist set tokudb_checkpoint_lock=1; flush logs;; -show processlist; -Id User Host db Command Time State Info -23 root localhost:53551 test Query 2 NULL flush logs -24 root localhost:53552 test Query 0 NULL show processlist +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Query 0 executing select DB, command, time, state, info from information_schema.processlist +test Query 2 NULL flush logs set tokudb_checkpoint_lock=0; diff --git a/mysql-test/suite/tokudb.bugs/r/checkpoint_lock_2.result b/mysql-test/suite/tokudb.bugs/r/checkpoint_lock_2.result index 9c1084fa9bf..0cb588f744c 100755 --- a/mysql-test/suite/tokudb.bugs/r/checkpoint_lock_2.result +++ b/mysql-test/suite/tokudb.bugs/r/checkpoint_lock_2.result @@ -1,44 +1,44 @@ SET STORAGE_ENGINE = 'tokudb'; # Establish connection conn1 (user = root) # should see nothing -show processlist; -Id User Host db Command Time State Info -20 root localhost:53548 test Query 0 NULL show processlist -21 root localhost:53549 test Sleep 0 NULL -22 root localhost:53550 test Sleep 0 NULL +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Sleep 0 NULL +test Sleep 0 NULL +test Query 0 executing select DB, command, time, state, info from information_schema.processlist flush logs; # should see nothing -show processlist; -Id User Host db Command Time State Info -20 root localhost:53548 test Query 0 NULL show processlist -21 root localhost:53549 test Sleep 0 NULL -22 root localhost:53550 test Sleep 0 NULL +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Sleep 0 NULL +test Sleep 0 NULL +test Query 0 executing select DB, command, time, state, info from information_schema.processlist set session tokudb_checkpoint_lock=1; flush logs;; # should see a flush logs -show processlist; -Id User Host db Command Time State Info -20 root localhost:53548 test Query 2 NULL flush logs -21 root localhost:53549 test Sleep 2 NULL -22 root localhost:53550 test Query 0 NULL show processlist +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Query 0 executing select DB, command, time, state, info from information_schema.processlist +test Sleep 2 NULL +test Query 2 NULL flush logs set session tokudb_checkpoint_lock=1; # should still see a flush logs -show processlist; -Id User Host db Command Time State Info -20 root localhost:53548 test Query 2 NULL flush logs -21 root localhost:53549 test Sleep 2 NULL -22 root localhost:53550 test Query 0 NULL show processlist +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Query 0 executing select DB, command, time, state, info from information_schema.processlist +test Sleep 2 NULL +test Query 2 NULL flush logs set session tokudb_checkpoint_lock=0; # should still see a flush logs -show processlist; -Id User Host db Command Time State Info -20 root localhost:53548 test Query 4 NULL flush logs -21 root localhost:53549 test Query 0 NULL show processlist -22 root localhost:53550 test Sleep 2 NULL +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Sleep 2 NULL +test Query 0 executing select DB, command, time, state, info from information_schema.processlist +test Query 4 NULL flush logs set session tokudb_checkpoint_lock=0; # should see nothing -show processlist; -Id User Host db Command Time State Info -20 root localhost:53548 test Sleep 6 NULL -21 root localhost:53549 test Sleep 2 NULL -22 root localhost:53550 test Query 0 NULL show processlist +select DB, command, time, state, info from information_schema.processlist; +DB command time state info +test Query 0 executing select DB, command, time, state, info from information_schema.processlist +test Sleep 2 NULL +test Sleep 6 NULL diff --git a/mysql-test/suite/tokudb.bugs/t/checkpoint_lock.test b/mysql-test/suite/tokudb.bugs/t/checkpoint_lock.test index 551498500ba..ef266230711 100755 --- a/mysql-test/suite/tokudb.bugs/t/checkpoint_lock.test +++ b/mysql-test/suite/tokudb.bugs/t/checkpoint_lock.test @@ -7,9 +7,9 @@ SET STORAGE_ENGINE = 'tokudb'; connect (conn1,localhost,root,,); connection default; -show processlist; +select DB, command, time, state, info from information_schema.processlist; flush logs; -show processlist; +select DB, command, time, state, info from information_schema.processlist; connection conn1; set tokudb_checkpoint_lock=1; @@ -19,7 +19,7 @@ connection default; connection conn1; --sleep 2 -show processlist; +select DB, command, time, state, info from information_schema.processlist; set tokudb_checkpoint_lock=0; connection default; diff --git a/mysql-test/suite/tokudb.bugs/t/checkpoint_lock_2.test b/mysql-test/suite/tokudb.bugs/t/checkpoint_lock_2.test index eb40060b6ca..3fc760b6107 100755 --- a/mysql-test/suite/tokudb.bugs/t/checkpoint_lock_2.test +++ b/mysql-test/suite/tokudb.bugs/t/checkpoint_lock_2.test @@ -9,10 +9,12 @@ connect (conn2,localhost,root,,); connection default; --echo # should see nothing -show processlist; +select DB, command, time, state, info from information_schema.processlist; + flush logs; --echo # should see nothing -show processlist; +select DB, command, time, state, info from information_schema.processlist; + connection conn1; set session tokudb_checkpoint_lock=1; @@ -23,22 +25,26 @@ connection default; connection conn2; --sleep 2 --echo # should see a flush logs -show processlist; +select DB, command, time, state, info from information_schema.processlist; + set session tokudb_checkpoint_lock=1; --echo # should still see a flush logs -show processlist; +select DB, command, time, state, info from information_schema.processlist; + connection conn1; --sleep 2 set session tokudb_checkpoint_lock=0; --echo # should still see a flush logs -show processlist; +select DB, command, time, state, info from information_schema.processlist; + connection conn2; set session tokudb_checkpoint_lock=0; --sleep 2 --echo # should see nothing -show processlist; +select DB, command, time, state, info from information_schema.processlist; + connection default; --reap