mariadb/mysql-test/suite
Sachin 284c72eacf MDEV-17614 INSERT on dup key update is replication unsafe
Problem:-
When mysql executes INSERT ON DUPLICATE KEY INSERT, the storage engine checks
if the inserted row would generate a duplicate key error. If yes, it returns
the existing row to mysql, mysql updates it and sends it back to the storage
engine.When the table has more than one unique or primary key, this 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.The order that the
storage engine checks keys is not deterministic. For example, InnoDB checks
keys in an order that depends on the order in which indexes were added to
the table. The first added index is checked first. So if master and slave
have added indexes in different orders, then slave may go out of sync.

Solution:-
Make INSERT...ON DUPLICATE KEY UPDATE unsafe while using stmt or mixed format
When there is more then one unique key.
Although there is two exception.
  1. Auto Increment key is not counted because Innodb will get gap lock for
    failed Insert and concurrent insert will get a next increment value. But if
    user supplies auto inc value it can be unsafe.
  2. Count only unique keys for which insertion is performed.

So this patch also addresses the bug id #72921
2019-08-09 19:36:56 +05:30
..
archive MDEV-17297: stats.records=0 for a table of Archive engine when it has rows, when we run ANALYZE command 2019-04-18 23:12:43 +03:00
binlog Merge branch '5.5' into 10.1 2019-07-25 13:27:11 +02:00
binlog_encryption Merge branch '10.0' into 10.1 2017-01-16 03:18:14 +02:00
csv Merge 10.0 into 10.1 2017-05-19 12:29:37 +03:00
encryption MDEV-16111 encryption.innodb_lotoftables failed in buildbot with wrong result 2019-06-12 19:08:49 +03:00
engines Merge branch '10.0' into 10.1 2018-11-15 17:20:26 +01:00
federated Merge branch '10.0' into 10.1 2018-06-12 18:55:27 +03:00
funcs_1 MDEV-15945 --ps-protocol does not test some queries 2019-03-12 13:10:49 +01:00
funcs_2 Merge branch '10.0' into 10.1 2017-01-16 03:18:14 +02:00
galera Fix galera_log_bin 2019-06-29 01:08:30 +05:30
galera_3nodes MDEV-16021: galera mtr test galera_evs_suspect_timeout crashed 2019-05-17 08:29:45 +03:00
handler MDEV-15945 --ps-protocol does not test some queries 2019-03-12 13:10:49 +01:00
heap Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera 2018-10-30 13:22:52 +02:00
innodb Merge branch '5.5' into 10.1 2019-07-25 13:27:11 +02:00
innodb_fts MDEV-19445 heap-use-after-free related to innodb_ft_aux_table 2019-05-13 17:16:42 +03:00
innodb_zip MDEV-14904 Backport innodb_default_row_format 2018-03-07 17:49:42 +02:00
jp
large_tests
maria Merge branch '10.0' into 10.1 2018-10-30 15:10:01 +01:00
mariabackup MDEV-12711 mariabackup --backup is refused for multi-file system tablespace 2019-03-26 13:51:15 +02:00
mtr/t
mtr2
multi_source MDEV-8874 Replication filters configured in my.cnf are ignored if slave reset and reconfigured 2019-06-27 09:54:20 +05:30
optimizer_unfixed_bugs Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
parts MDEV-9519: Data corruption will happen on the Galera cluster size change 2019-02-25 11:19:07 +02:00
percona
perfschema Update FSF address 2019-05-11 19:25:02 +03:00
perfschema_stress Update FSF Address 2019-05-11 21:29:06 +03:00
plugins MDEV-18686 Add option to PAM authentication plugin to allow case insensitive username matching 2019-04-24 16:06:54 +02:00
roles MDEV-18298 Crashes server with segfault during role grants 2019-04-02 18:22:37 +02:00
rpl MDEV-17614 INSERT on dup key update is replication unsafe 2019-08-09 19:36:56 +05:30
storage_engine Merge 10.0 into 10.1 2019-03-27 11:56:08 +02:00
stress
sys_vars 5.6.44-86.0 2019-07-23 15:47:22 +03:00
unit Merge branch '5.5' into 10.0 2018-06-21 00:44:10 +02:00
vcol Merge 10.0 into 10.1 2019-03-27 11:56:08 +02:00
wsrep Fix test failure on wsrep.variables 2018-10-04 07:13:30 +03:00