diff options
author | unknown <davi@mysql.com/endora.local> | 2008-02-27 18:08:29 -0300 |
---|---|---|
committer | unknown <davi@mysql.com/endora.local> | 2008-02-27 18:08:29 -0300 |
commit | e9068d0b73a6e5c6ac4d0039793f127e1c563144 (patch) | |
tree | b187ccbdec5b984f8e67bd0baead103b68f262f4 | |
parent | fe7035a73ab096efa65e071793e61b3549168f8d (diff) | |
download | mariadb-git-e9068d0b73a6e5c6ac4d0039793f127e1c563144.tar.gz |
Fix for team tree failure. Synchronously wait for the query state
to reach the desired value.
mysql-test/r/flush_read_lock_kill.result:
Update test case result.
mysql-test/t/flush_read_lock_kill.test:
Wait for the debug synchronization point to be reached.
-rw-r--r-- | mysql-test/r/flush_read_lock_kill.result | 1 | ||||
-rw-r--r-- | mysql-test/t/flush_read_lock_kill.test | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/r/flush_read_lock_kill.result b/mysql-test/r/flush_read_lock_kill.result index 6703b6bd533..f69656806da 100644 --- a/mysql-test/r/flush_read_lock_kill.result +++ b/mysql-test/r/flush_read_lock_kill.result @@ -1,3 +1,4 @@ +set @@global.concurrent_insert= 0; drop table if exists t1; create table t1 (kill_id int); insert into t1 values(connection_id()); diff --git a/mysql-test/t/flush_read_lock_kill.test b/mysql-test/t/flush_read_lock_kill.test index 19a47b2893a..c3926d09205 100644 --- a/mysql-test/t/flush_read_lock_kill.test +++ b/mysql-test/t/flush_read_lock_kill.test @@ -12,6 +12,10 @@ -- source include/have_debug.inc +# Disable concurrent inserts to avoid test failures when reading the +# connection id which was inserted into a table by another thread. +set @@global.concurrent_insert= 0; + connect (con1,localhost,root,,); connect (con2,localhost,root,,); connection con1; @@ -34,7 +38,14 @@ send flush tables with read lock; connection con2; select ((@id := kill_id) - kill_id) from t1; ---sleep 2 # leave time for FLUSH to block +# Wait for the debug sync point, test won't run on non-debug +# builds anyway. +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for all running commits to finish" + and info = "flush tables with read lock"; +--source include/wait_condition.inc + kill connection @id; connection con1; |