summaryrefslogtreecommitdiff
path: root/mysql-test/t/client_xml.test
diff options
context:
space:
mode:
authorunknown <davi@mysql.com/endora.local>2008-04-30 10:28:19 -0300
committerunknown <davi@mysql.com/endora.local>2008-04-30 10:28:19 -0300
commit57ae28ab95fb3fede2ae191daca8eb21541230c4 (patch)
tree7b7a498d7804d4fc4162d96c622e64eb05d5eca1 /mysql-test/t/client_xml.test
parent86e6ea34ec6625878cb6e07ff23d761212029070 (diff)
downloadmariadb-git-57ae28ab95fb3fede2ae191daca8eb21541230c4.tar.gz
Bug#35788 A few tests fail due to concurrent inserts
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/client_xml.result: Update test case result. mysql-test/r/federated.result: Update test case result. mysql-test/r/federated_bug_25714.result: Update test case result. mysql-test/t/client_xml.test: Disable concurrent insert and restore old value at the end of the test so it doesn't affect other tests. mysql-test/t/federated.test: Disable concurrent insert and restore old value at the end of the test so it doesn't affect other tests. mysql-test/t/federated_bug_25714.test: Disable concurrent insert and restore old value at the end of the test so it doesn't affect other tests.
Diffstat (limited to 'mysql-test/t/client_xml.test')
-rw-r--r--mysql-test/t/client_xml.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/client_xml.test b/mysql-test/t/client_xml.test
index 8ee63a6131b..889861ad4a4 100644
--- a/mysql-test/t/client_xml.test
+++ b/mysql-test/t/client_xml.test
@@ -1,6 +1,12 @@
# Can't run with embedded server
-- source include/not_embedded.inc
+# Disable concurrent inserts to avoid test failures when reading
+# data from concurrent connections (insert might return before
+# the data is actually in the table).
+set @old_concurrent_insert= @@global.concurrent_insert;
+set @@global.concurrent_insert= 0;
+
# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
# sure that basic encoding issues are handled properly
create table t1 (
@@ -21,3 +27,6 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
--exec $MYSQL --xml test -vv -e "select 1 limit 0"
drop table t1;
+
+# Restore global concurrent_insert value
+set @@global.concurrent_insert= @old_concurrent_insert;