Skip to content
  • Ole John Aske's avatar
    23d04c53
    Bug#27930382: FOREIGN KEY CONSTRAINT VIOLATIONS INCORRECTLY REPORTED · 23d04c53
    Ole John Aske authored
    Addendum patch fixing another false possitive FK constraint violation.
    
    After the previous patch we ensure that the the SECONDARY_INDEX triggers
    modifing the indexes are fired before the FK_CHILD / FK_PARENT
    triggers which verifies the intergrity of the FK-constraints.
    
    However, it turned out that the LQHKEYREQ(read) operations emitted
    by the FK_CHILD / FK_PARENT triggers was optimized to read from
    the local backup replicas if any such were found by TC. Thus, the
    read could race an update/delete operation emitted by the preceeding
    SECONDARY_INDEX trigger. Resulting in the local backup replica to
    be read before the update/delete operation had been reflected in it.
    This caused false FK-constraint violations to be reported.
    
    This patch disables the 'read local replica' optimization if the
    READ operation is part of a FK-constraint check.
    23d04c53
    Bug#27930382: FOREIGN KEY CONSTRAINT VIOLATIONS INCORRECTLY REPORTED
    Ole John Aske authored
    Addendum patch fixing another false possitive FK constraint violation.
    
    After the previous patch we ensure that the the SECONDARY_INDEX triggers
    modifing the indexes are fired before the FK_CHILD / FK_PARENT
    triggers which verifies the intergrity of the FK-constraints.
    
    However, it turned out that the LQHKEYREQ(read) operations emitted
    by the FK_CHILD / FK_PARENT triggers was optimized to read from
    the local backup replicas if any such were found by TC. Thus, the
    read could race an update/delete operation emitted by the preceeding
    SECONDARY_INDEX trigger. Resulting in the local backup replica to
    be read before the update/delete operation had been reflected in it.
    This caused false FK-constraint violations to be reported.
    
    This patch disables the 'read local replica' optimization if the
    READ operation is part of a FK-constraint check.
Loading