Skip to content
  • Vasil Dimov's avatar
    9b2aac10
    Merge mysql-5.5-security -> mysql-trunk-security · 9b2aac10
    Vasil Dimov authored
    This is a merge for the fix of Bug#12661768 UPDATE IGNORE CRASHES SERVER
    IF TABLE IS INNODB AND IT IS PARENT FOR OTHER ONE
    
    However the patch is different from the patch that went into 5.1 and 5.5 -
    a less risky patch was pushed there. In 5.6 we change the handler interface
    and add a new error message.
    
    This is the proper commit message for the patch that is in MySQL 5.6:
    
    --- cut ---
    Fix Bug#12661768 UPDATE IGNORE CRASHES SERVER IF TABLE IS INNODB AND IT IS
    PARENT FOR OTHER ONE
    
    When "UPDATE t1 SET c = 1" is prevented by a duplicate entry in t2 (where
    there is a FK on t1 and t2 and ON UPDATE CASCADE), then InnoDB returns the
    number of the offending index from t2, but the MySQL part of the code
    assumes this is the Nth index from t1. If t1 contains less indexes, then a
    crash may occur, or if the returned number is less than the number of the
    indexes - then a bogus data is printed.
    
    Since MySQL is not aware of the second table, the option here is to return
    its name and the index name from InnoDB to MySQL instead of just a bare
    number (designating the number of the index).
    
    Approved by:	Jimmy, Marko, Jon Olav Hauglid (rb://768)
    --- cut ---
    9b2aac10
    Merge mysql-5.5-security -> mysql-trunk-security
    Vasil Dimov authored
    This is a merge for the fix of Bug#12661768 UPDATE IGNORE CRASHES SERVER
    IF TABLE IS INNODB AND IT IS PARENT FOR OTHER ONE
    
    However the patch is different from the patch that went into 5.1 and 5.5 -
    a less risky patch was pushed there. In 5.6 we change the handler interface
    and add a new error message.
    
    This is the proper commit message for the patch that is in MySQL 5.6:
    
    --- cut ---
    Fix Bug#12661768 UPDATE IGNORE CRASHES SERVER IF TABLE IS INNODB AND IT IS
    PARENT FOR OTHER ONE
    
    When "UPDATE t1 SET c = 1" is prevented by a duplicate entry in t2 (where
    there is a FK on t1 and t2 and ON UPDATE CASCADE), then InnoDB returns the
    number of the offending index from t2, but the MySQL part of the code
    assumes this is the Nth index from t1. If t1 contains less indexes, then a
    crash may occur, or if the returned number is less than the number of the
    indexes - then a bogus data is printed.
    
    Since MySQL is not aware of the second table, the option here is to return
    its name and the index name from InnoDB to MySQL instead of just a bare
    number (designating the number of the index).
    
    Approved by:	Jimmy, Marko, Jon Olav Hauglid (rb://768)
    --- cut ---
Loading