summaryrefslogtreecommitdiff
path: root/mysql-test/t/flush_read_lock_kill.test
diff options
context:
space:
mode:
authorunknown <davi@mysql.com/endora.local>2008-03-13 14:54:29 -0300
committerunknown <davi@mysql.com/endora.local>2008-03-13 14:54:29 -0300
commit416ab8532e6ee39de48c75aca49aa665cc8d2a2a (patch)
treec18a39185f2e499114d9d78dd56f60c9ad21d23c /mysql-test/t/flush_read_lock_kill.test
parent054341a6d07110dac1d05f023abd98bf7eaad39e (diff)
downloadmariadb-git-416ab8532e6ee39de48c75aca49aa665cc8d2a2a.tar.gz
Bug#34891 sp_notembedded.test fails sporadically
The problem is that since MyISAM's concurrent_insert is on by default some concurrent SELECT statements might not see changes made by INSERT statements in other connections, even if the INSERT statement has returned. The solution is to disable concurrent_insert so that INSERT statements returns after the data is actually visible to other statements. mysql-test/r/flush_read_lock_kill.result: Restore old value of @@global.concurrent_insert mysql-test/r/kill.result: Restore old value of @@global.concurrent_insert mysql-test/r/sp_notembedded.result: Update test case result mysql-test/t/flush_read_lock_kill.test: Restore old value of @@global.concurrent_insert so it doesn't affect other tests. mysql-test/t/kill.test: Restore old value of @@global.concurrent_insert so it doesn't affect other tests. mysql-test/t/sp_notembedded.test: Disable and restore concurrent_insert value at the end of the test case. The test case for Bug 29936 requires that the inserted rows need to be visible before a SELECT statement is queued in another connection. Remove sleep at the start of the test, it's not necessary to log the result of the processlist command, showing the warnings has the same end result.
Diffstat (limited to 'mysql-test/t/flush_read_lock_kill.test')
-rw-r--r--mysql-test/t/flush_read_lock_kill.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/t/flush_read_lock_kill.test b/mysql-test/t/flush_read_lock_kill.test
index c3926d09205..c03f3be2534 100644
--- a/mysql-test/t/flush_read_lock_kill.test
+++ b/mysql-test/t/flush_read_lock_kill.test
@@ -14,6 +14,7 @@
# Disable concurrent inserts to avoid test failures when reading the
# connection id which was inserted into a table by another thread.
+set @old_concurrent_insert= @@global.concurrent_insert;
set @@global.concurrent_insert= 0;
connect (con1,localhost,root,,);
@@ -58,3 +59,7 @@ reap;
connection con2;
drop table t1;
+connection default;
+
+# Restore global concurrent_insert value
+set @@global.concurrent_insert= @old_concurrent_insert;