diff options
author | Rohit Kalhans <rohit.kalhans@oracle.com> | 2012-03-30 18:35:53 +0530 |
---|---|---|
committer | Rohit Kalhans <rohit.kalhans@oracle.com> | 2012-03-30 18:35:53 +0530 |
commit | fe9352454f5596a77a363417b5a163bb0c6f55d0 (patch) | |
tree | cf3a397f215b98b086eecd9d4eefbbf5e6bb5fce /sql/sql_lex.h | |
parent | 3865ce52e99b48e1c4b140f899a443cd97f7b894 (diff) | |
download | mariadb-git-fe9352454f5596a77a363417b5a163bb0c6f55d0.tar.gz |
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.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 6d004d0fa24..1ce8bd3f8fa 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -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 }; |