diff options
author | Aditya A <aditya.a@oracle.com> | 2015-08-12 19:17:26 +0530 |
---|---|---|
committer | Aditya A <aditya.a@oracle.com> | 2015-08-12 19:17:26 +0530 |
commit | 608efca4c4e4afa1ffea251abda675fcc06efc69 (patch) | |
tree | 466a476037ad3559bc90f2c3263f5818d4d78ab7 /mysql-test/r/subselect.result | |
parent | f59d68eeae37338d7b25f2571407e763fa897e15 (diff) | |
download | mariadb-git-608efca4c4e4afa1ffea251abda675fcc06efc69.tar.gz |
Bug #21025880 DUPLICATE UK VALUES IN READ-COMMITTED (AGAIN)
PROBLEM
Whenever we insert in unique secondary index we take shared
locks on all possible duplicate record present in the table.
But while during a replace on the unique secondary index ,
we take exclusive and locks on the all duplicate record.
When the records are deleted, they are first delete marked
and later purged by the purge thread. While purging the
record we call the lock_update_delete() which in turn calls
lock_rec_inherit_to_gap() to inherit locks of the deleted
records. In repeatable read mode we inherit all the locks
from the record to the next record but in the read commited
mode we skip inherting them as gap type locks. We make a
exception here if the lock on the records is in shared mode
,we assume that it is set during insert for unique secondary
index and needs to be inherited to stop constraint violation.
We didnt handle the case when exclusive locks are set during
replace, we skip inheriting locks of these records and hence
causing constraint violation.
FIX
While inheriting the locks,check whether the transaction is
allowed to do TRX_DUP_REPLACE/TRX_DUP_IGNORE, if true
inherit the locks.
[ Revewied by Jimmy #rb9709]
Diffstat (limited to 'mysql-test/r/subselect.result')
0 files changed, 0 insertions, 0 deletions