1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fix sporadic innodb.auto_increment_dup failures

fix a race condition in the test
This commit is contained in:
Sergei Golubchik
2016-09-19 19:55:49 +02:00
parent 398d33ce9d
commit e4f70789d5
2 changed files with 9 additions and 5 deletions

View File

@ -81,18 +81,20 @@ affected rows: 0
#
connect con1, localhost, root;
connect con2, localhost, root;
SET DEBUG_SYNC='now WAIT_FOR write_row_done';
connection con1;
#
# Connection 1
#
SET DEBUG_SYNC=IF(@@innodb_autoinc_lock_mode > 0, 'ha_write_row_end WAIT_FOR continue', 'RESET');
SET DEBUG_SYNC='ha_write_row_end SIGNAL write_row_done WAIT_FOR continue';
affected rows: 0
INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1';
connection con2;
#
# Connection 2
#
SET DEBUG_SYNC=IF(@@innodb_autoinc_lock_mode > 0, 'execute_command_after_close_tables SIGNAL continue', 'RESET');
affected rows: 0
SET DEBUG_SYNC='execute_command_after_close_tables SIGNAL continue';
affected rows: 0
INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
ERROR HY000: Lock wait timeout exceeded; try restarting transaction