Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.6, 10.11, 11.4, 11.8
-
None
-
Can result in unexpected behaviour
-
UNIQUE constraint that was USING HASH or WITHOUT OVERLAPS could be violated under heavy load in READ COMMITTED transaction isolation mode. This is now fixed for INSERT [IGNORE] and UPDATE, and disallowed in UPDATE IGNORE.
Description
Test case from debarun:
--source include/have_innodb.inc
|
--source include/have_debug_sync.inc
|
create table t1 ( |
col1 int primary key, |
col2 varchar(3000), |
unique (col2) using hash) engine=innodb; |
--echo # Keep a Read View open to prevent purge
|
start transaction; |
select * from t1; |
--connect con1,localhost,root
|
--echo # Create delete marked secondary index Record ('a', 10)
|
insert into t1 values(10, 'a'); |
delete from t1; |
--echo # Insert secondary index key ('a', 15) in the GAP between ('a', 10) and Supremum
|
set transaction isolation level read committed; |
set debug_sync="innodb_row_ins_step_enter SIGNAL checked_duplicate WAIT_FOR do_insert"; |
--send insert into t1 values(15, 'a')
|
--connect con2,localhost,root
|
set debug_sync="now WAIT_FOR checked_duplicate"; |
--echo # Insert secondary index key ('a', 5) in the GAP between Infimum and ('a', 10)
|
set session innodb_lock_wait_timeout = 1; |
set transaction isolation level read committed; |
insert into t1 values(5, 'a'); |
set debug_sync="now SIGNAL do_insert"; |
--connection con1
|
--reap
|
--connection default
|
select * from t1; |
commit; |
select * from t1; |
--disconnect con1
|
--disconnect con2
|
set debug_sync='RESET'; |
drop table t1; |
Attachments
Issue Links
- causes
-
MDEV-37268 ER_NOT_KEYFILE or assertion failure upon REPLACE into table with unique hash under READ-COMMITTED
-
- Closed
-
-
MDEV-37310 Non-debug failing assertion node->pcur->rel_pos == BTR_PCUR_ON upon violating long unique under READ-COMMITTED
-
- Closed
-
- relates to
-
MDEV-371 Unique indexes for blobs
-
- Closed
-
- split to
-
MDEV-37233 UPDATE IGNORE in READ COMMITTED with long unique or without overlaps doesn't work
-
- Open
-