Commit 60dd52e3 authored by Sergei Golubchik's avatar Sergei Golubchik

fix innodb.row_lock test to work in 10.0

parent 3e7519f1
......@@ -6,10 +6,7 @@ CREATE TABLE t3 (e INT) ENGINE=InnoDB;
CREATE TABLE t4 ENGINE=InnoDB AS SELECT * FROM t2;
BEGIN;
UPDATE t1 SET a = 0 WHERE a = ( SELECT e FROM t3 );
SET DEBUG_SYNC='srv_suspend_mysql_thread_enter SIGNAL waiting';
UPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6;
SET DEBUG_SYNC='now WAIT_FOR waiting';
SET DEBUG_SYNC='RESET';
UPDATE t4 SET d = 9;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
commit;
......
if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`)
{
--skip Not fixed in InnoDB before 5.6.17
}
#
# Test of wrong call to unlock_row
# MDEV-5629 Failing assertion: state == TRX_STATE_NOT_STARTED on
......@@ -10,7 +5,6 @@ if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where
#
--source include/have_innodb.inc
--source include/have_debug_sync.inc
CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1),(2,2);
......@@ -28,17 +22,17 @@ UPDATE t1 SET a = 0 WHERE a = ( SELECT e FROM t3 );
--connect (con12,localhost,root,,test)
SET DEBUG_SYNC='srv_suspend_mysql_thread_enter SIGNAL waiting';
--send
UPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6;
--connection con11
# Wait for con12 to start waiting for con11
SET DEBUG_SYNC='now WAIT_FOR waiting';
SET DEBUG_SYNC='RESET';
let $wait_condition=
select count(*) = 1 from information_schema.innodb_trx
where trx_state = "lock wait" and
trx_query like "%SELECT a FROM t1%";
--source include/wait_condition.inc
UPDATE t4 SET d = 9;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment