1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

BUG#11765650 - 58637: MARK UPDATES THAT DEPEND ON ORDER OF TWO KEYS UNSAFE

Description: When the table has more than one unique or primary key, 
 INSERT... ON DUP KEY UPDATE statement is sensitive to the order in which
 the storage engines checks the keys. Depending on this order, the storage
 engine may determine different rows to mysql, and hence mysql can update
 different rows on master and slave.
      
 Solution: We mark INSERT...ON DUP KEY UPDATE on a table with more than on unique
 key as unsafe therefore the event will be logged in row format if it is available
 (ROW/MIXED). If only STATEMENT format is available, a warning will be thrown.
This commit is contained in:
Rohit Kalhans
2012-03-30 18:35:53 +05:30
parent 3865ce52e9
commit fe9352454f
7 changed files with 55 additions and 1 deletions

View File

@ -1323,6 +1323,12 @@ public:
*/
BINLOG_STMT_UNSAFE_UPDATE_IGNORE,
/**
INSERT... ON DUPLICATE KEY UPDATE on a table with more than one
UNIQUE KEYS is unsafe.
*/
BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS,
/* The last element of this enumeration type. */
BINLOG_STMT_UNSAFE_COUNT
};