diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index a4cd6019be8..fdac8deb87e 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -1309,6 +1309,7 @@ SELECT * FROM t1; --echo # Switch to connection con2 connection con2; +--reap SELECT * FROM t1; --echo # Switch to connection con1 diff --git a/mysql-test/r/client_xml.result b/mysql-test/r/client_xml.result index ed5e8f2c1b8..6e9857c2d6d 100644 --- a/mysql-test/r/client_xml.result +++ b/mysql-test/r/client_xml.result @@ -1,3 +1,5 @@ +set @old_concurrent_insert= @@global.concurrent_insert; +set @@global.concurrent_insert= 0; create table t1 ( `a&b` int, `ab'); --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; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index fc6d78a76ac..db4c2d87930 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -10,7 +10,6 @@ # ############################################################################## federated_transactions : Bug#29523 Transactions do not work -innodb_mysql : Bug#32724: innodb_mysql.test fails randomly status : Bug#32966 main.status fails ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test index 907c7e722ac..69a2d3187db 100644 --- a/mysql-test/t/federated.test +++ b/mysql-test/t/federated.test @@ -2,6 +2,14 @@ --source include/not_embedded.inc --source include/federated.inc +connection default; + +# 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; + connection slave; DROP TABLE IF EXISTS federated.t1; CREATE TABLE federated.t1 ( @@ -1857,3 +1865,7 @@ drop server 's1'; --echo End of 5.1 tests source include/federated_cleanup.inc; + +connection default; + +SET @@GLOBAL.CONCURRENT_INSERT= @OLD_CONCURRENT_INSERT; diff --git a/mysql-test/t/federated_bug_25714.test b/mysql-test/t/federated_bug_25714.test index 9c185181511..26ff143135a 100644 --- a/mysql-test/t/federated_bug_25714.test +++ b/mysql-test/t/federated_bug_25714.test @@ -1,6 +1,13 @@ --source include/have_bug25714.inc source include/federated.inc; +connection default; + +# 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; connection slave; --disable_warnings @@ -42,6 +49,8 @@ DROP TABLE federated.t1; connection slave; DROP TABLE federated.t1; - source include/federated_cleanup.inc; +connection default; + +SET @@GLOBAL.CONCURRENT_INSERT= @OLD_CONCURRENT_INSERT; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2b57071d497..f2e8d713371 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3301,6 +3301,7 @@ end_with_restore_list: can free its locks if LOCK TABLES locked some tables before finding that it can't lock a table in its list */ + ha_autocommit_or_rollback(thd, 1); end_active_trans(thd); thd->options&= ~(OPTION_TABLE_LOCK); }