| 1 |
# Test for Bug#31205266 : CONCURRENT UPDATE CAUSE CRASH IN ROW_SEARCH_MVCC |
| 2 |
|
| 3 |
--source include/have_debug.inc |
| 4 |
--source include/have_debug_sync.inc |
| 5 |
|
| 6 |
--disable_query_log |
| 7 |
SET @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug; |
| 8 |
--enable_query_log |
| 9 |
|
| 10 |
# Save the initial number of concurrent sessions |
| 11 |
--source include/count_sessions.inc |
| 12 |
|
| 13 |
--connect(con1,localhost,root,'',) |
| 14 |
|
| 15 |
set debug_sync='reset'; |
| 16 |
|
| 17 |
connection default; |
| 18 |
CREATE TABLE t1 ( |
| 19 |
id int(11) NOT NULL auto_increment, |
| 20 |
ggid varchar(32) binary DEFAULT '' NOT NULL, |
| 21 |
email varchar(64) DEFAULT '' NOT NULL, |
| 22 |
passwd varchar(32) binary DEFAULT '' NOT NULL, |
| 23 |
PRIMARY KEY (id), |
| 24 |
UNIQUE ggid (ggid) |
| 25 |
) ENGINE=innodb; |
| 26 |
|
| 27 |
SET GLOBAL innodb_limit_optimistic_insert_debug = 2; |
| 28 |
|
| 29 |
insert into t1 (ggid,passwd) values ('test1','xxx'); |
| 30 |
insert into t1 (ggid,passwd) values ('test2','yyy'); |
| 31 |
|
| 32 |
set debug_sync='row_search_before_mtr_restart_for_extra_clust SIGNAL reached WAIT_FOR continue'; |
| 33 |
--send |
| 34 |
select * from t1 where ggid='test2'; |
| 35 |
|
| 36 |
connection con1; |
| 37 |
set debug_sync='now WAIT_FOR reached'; |
| 38 |
|
| 39 |
#moves the record to the another place and causes split at the page |
| 40 |
update t1 set ggid='test0' where id=2; |
| 41 |
insert into t1 (ggid,passwd) values ('test2','www'); |
| 42 |
|
| 43 |
set debug_sync='now SIGNAL continue'; |
| 44 |
|
| 45 |
connection default; |
| 46 |
reap; |
| 47 |
|
| 48 |
disconnect con1; |
| 49 |
|
| 50 |
set debug_sync='reset'; |
| 51 |
drop table t1; |
| 52 |
|
| 53 |
--disable_query_log |
| 54 |
SET GLOBAL innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug; |
| 55 |
--enable_query_log |
| 56 |
|
| 57 |
# Wait till all disconnects are completed. |
| 58 |
--source include/wait_until_count_sessions.inc |