| 1 |
--source include/have_debug_sync.inc |
| 2 |
|
| 3 |
# Save the initial number of concurrent sessions. |
| 4 |
--source include/count_sessions.inc |
| 5 |
|
| 6 |
connect (con1,localhost,root,,); |
| 7 |
|
| 8 |
connection default; |
| 9 |
|
| 10 |
CREATE TABLE t (a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB; |
| 11 |
INSERT INTO t VALUES(1,2),(2,3); |
| 12 |
|
| 13 |
SET DEBUG_SYNC='alter_table_inplace_after_lock_downgrade SIGNAL do WAIT_FOR m'; |
| 14 |
SET DEBUG_SYNC='innodb_after_inplace_alter_table SIGNAL scanned WAIT_FOR done'; |
| 15 |
--send |
| 16 |
CREATE INDEX tb ON t(b); |
| 17 |
|
| 18 |
connection con1; |
| 19 |
SET DEBUG_SYNC='now WAIT_FOR do'; |
| 20 |
SET DEBUG_SYNC='row_update_for_mysql_error SIGNAL m WAIT_FOR scanned'; |
| 21 |
--error ER_DUP_ENTRY |
| 22 |
UPDATE t SET a=2 WHERE a=1; |
| 23 |
call mtr.add_suppression(' record in index .*tb was not found on rollback, trying to insert'); |
| 24 |
SET DEBUG_SYNC='now SIGNAL done'; |
| 25 |
|
| 26 |
disconnect con1; |
| 27 |
|
| 28 |
connection default; |
| 29 |
reap; |
| 30 |
SET DEBUG_SYNC='RESET'; |
| 31 |
DROP TABLE t; |
| 32 |
|
| 33 |
# Check that all connections opened by test cases in this file are really |
| 34 |
# gone so execution of other tests won't be affected by their presence. |
| 35 |
--source include/wait_until_count_sessions.inc |