Skip to content
  • Priyanka Sangam's avatar
    1fb5c7a2
    Bug #19992856 MYSQL CLUSTER TRIGGER ON DELETE FALSE POSITIVE · 1fb5c7a2
    Priyanka Sangam authored
    
    
    For a delete query, mysqld does a range read to read all the PKs and
    ranges given in the query. If the range read does not return an error,
    the delete triggers are executed.
    
    The issue occurs because read before write removal is attempted with
    a delete query, on a table which has a delete trigger. The read is
    optimised away, so the range read cannot identify the empty range
    and return an end-of-file error. Since no error is returned, the
    delete trigger is executed even though no rows have been deleted.
    
    While running a delete or update query, there is a check to determine
    whether read before write removal should be used. Modified this check
    to disable read before write removal 1) for delete if the table has a
    delete trigger and 2) for update if the table has a update trigger.
    
    Reviewed-by: default avatarMagnus Blaudd <magnus.blaudd@oracle.com&gt;e>
    Reviewed-by: default avatarJon Olav Hauglid <jon.hauglid@oracle.com>
    1fb5c7a2
    Bug #19992856 MYSQL CLUSTER TRIGGER ON DELETE FALSE POSITIVE
    Priyanka Sangam authored
    
    
    For a delete query, mysqld does a range read to read all the PKs and
    ranges given in the query. If the range read does not return an error,
    the delete triggers are executed.
    
    The issue occurs because read before write removal is attempted with
    a delete query, on a table which has a delete trigger. The read is
    optimised away, so the range read cannot identify the empty range
    and return an end-of-file error. Since no error is returned, the
    delete trigger is executed even though no rows have been deleted.
    
    While running a delete or update query, there is a check to determine
    whether read before write removal should be used. Modified this check
    to disable read before write removal 1) for delete if the table has a
    delete trigger and 2) for update if the table has a update trigger.
    
    Reviewed-by: default avatarMagnus Blaudd <magnus.blaudd@oracle.com&gt;e>
    Reviewed-by: default avatarJon Olav Hauglid <jon.hauglid@oracle.com>
Loading