summaryrefslogtreecommitdiff
path: root/mysql-test/extra
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2017-07-03 09:33:41 +0200
committerKristian Nielsen <knielsen@knielsen-hq.org>2017-07-03 09:33:41 +0200
commit1d91910b944a801a2bbe138d4258c53eaeb0c473 (patch)
tree76f2ed8b5bb2c9e44eea7cc0366d8d1d7a070966 /mysql-test/extra
parent176000a54ceb8dabe8f8b985aff565dfae6fb0df (diff)
parent95e09f0766f037530d2dcfbb6c530137a4ee0db4 (diff)
downloadmariadb-git-1d91910b944a801a2bbe138d4258c53eaeb0c473.tar.gz
MDEV-12179: Per-engine mysql.gtid_slave_pos table
Merge into MariaDB 10.3.
Diffstat (limited to 'mysql-test/extra')
-rw-r--r--mysql-test/extra/rpl_tests/rpl_deadlock.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_deadlock.test b/mysql-test/extra/rpl_tests/rpl_deadlock.test
index f7a1e71d5d9..e9191d5fcd8 100644
--- a/mysql-test/extra/rpl_tests/rpl_deadlock.test
+++ b/mysql-test/extra/rpl_tests/rpl_deadlock.test
@@ -46,6 +46,9 @@ BEGIN;
SELECT * FROM t1 FOR UPDATE;
# Save variable 'Slave_retried_transactions' before deadlock
let $slave_retried_transactions= query_get_value(SHOW GLOBAL STATUS LIKE 'Slave_retried_transactions', Value, 1);
+# Run the START SLAVE in a separate connection. Otherwise it terminates
+# the SELECT FOR UPDATE transaction (START SLAVE does implicit COMMIT!).
+connection slave1;
START SLAVE;
# Wait until SQL thread blocked: variable 'Slave_retried_transactions' will incremented
let $status_var= Slave_retried_transactions;
@@ -53,6 +56,7 @@ let $status_var_value= $slave_retried_transactions;
let $status_type= GLOBAL;
let $status_var_comparsion= >;
--source include/wait_for_status_var.inc
+connection slave;
SELECT COUNT(*) FROM t2;
COMMIT;
sync_with_master;
@@ -78,9 +82,11 @@ BEGIN;
# Hold lock
SELECT * FROM t1 FOR UPDATE;
# Wait until slave stopped with error 'Lock wait timeout exceeded'
+connection slave1;
START SLAVE;
let $slave_sql_errno= 1205;
--source include/wait_for_slave_sql_error.inc
+connection slave;
SELECT COUNT(*) FROM t2;
COMMIT;
--source include/start_slave.inc
@@ -109,9 +115,11 @@ BEGIN;
# Hold lock
SELECT * FROM t1 FOR UPDATE;
# Wait until slave stopped with error 'Lock wait timeout exceeded'
+connection slave1;
START SLAVE;
let $slave_sql_errno= 1205;
--source include/wait_for_slave_sql_error.inc
+connection slave;
SELECT COUNT(*) FROM t2;
COMMIT;
--source include/start_slave.inc