• Annamalai Gurusami's avatar
    Bug #19140907 DUPLICATES IN UNIQUE SECONDARY INDEX BECAUSE OF FIX OF BUG#68021 · 76e690fb
    Annamalai Gurusami authored
    Problem:
    
    When a unique secondary index is scanned for duplicate checking, gap locks
    were not taken if the transaction had isolation level <= READ COMMITTED. 
    This change was done while fixing Bug #16133801 UNEXPLAINABLE INNODB UNIQUE
    INDEX LOCKS ON DELETE + INSERT WITH SAME VALUES (rb#2035). Because of this
    the duplicate check logic failed, and resulted in duplicate values in unique
    secondary index.
    
    Solution:
    
    When a unique secondary index is scanned for duplicate checking, gap locks
    must be taken irrespective of the transaction isolation level.  This is
    achieved by reverting rb#2035.
    
    rb#5910 approved by Jimmy
    76e690fb
row0ins.c 67.9 KB