mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-35115 Inconsistent Replace behaviour when multiple unique index exist
- Replace statement fails with duplicate key error when multiple unique key conflict happens. Reason is that Server expects the InnoDB engine to store the confliciting keys in ascending order. But the InnoDB doesn't store the conflicting keys in ascending order. Fix: === - Enable HA_DUPLICATE_KEY_NOT_IN_ORDER for InnoDB storage engine only when unique index order is different in .frm and innodb dictionary.
This commit is contained in:
16
mysql-test/suite/innodb/r/innodb-replace,INPLACE.rdiff
Normal file
16
mysql-test/suite/innodb/r/innodb-replace,INPLACE.rdiff
Normal file
@@ -0,0 +1,16 @@
|
||||
--- innodb-replace.result
|
||||
+++ innodb-replace,INPLACE.result
|
||||
@@ -31,10 +31,10 @@
|
||||
REPLACE INTO t1 (c1,c2,c3) VALUES (0,1,b'11');
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN ('HANDLER_DELETE','HANDLER_WRITE','HANDLER_READ_KEY','HANDLER_UPDATE');
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
-HANDLER_DELETE 1
|
||||
+HANDLER_DELETE 2
|
||||
HANDLER_READ_KEY 2
|
||||
-HANDLER_UPDATE 1
|
||||
-HANDLER_WRITE 2
|
||||
+HANDLER_UPDATE 0
|
||||
+HANDLER_WRITE 3
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3
|
||||
0 1
|
Reference in New Issue
Block a user