Debian Codegraph @

mysql-test/suite/rpl/t/rpl_insert_on_update.test

raw
1 ###############################################################################
2 # Bug#17588419: INSERT ON DUPLICATE KEY UPDATE FAILING AFTER MYSQL 5.6
3 # UPGRADE.
4 #
5 # Problem:
6 # ========
7 # After upgrading a MySQL 5.5.23 slave to 5.6.14 (the master still runs 5.5.23)
8 # on executing INSERT ON DUPLICATE KEY following error is reported in SBR.
9 #
10 # [ERROR] Slave SQL: Error 'Auto-increment value in UPDATE conflicts with
11 # internally generated values' on query.
12 #
13 # Test:
14 # =====
15 # Execute INSERT ON DUPLICATE KEY UPDATE statements on master and try to sync
16 # master with slave. With the bug sync operation will fail with
17 # ER_AUTO_INCREMENT_CONFLICT. Post fix sync operation should succeed.
18 # Note:
19 # As part of the bug fix the issue is fixed only with innodb storage engine.
20 ###############################################################################
21 --source include/master-slave.inc
22
23 --disable_query_log
24 SET SESSION sql_log_bin= 0;
25 CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format*");
26 SET SESSION sql_log_bin= 1;
27 --enable_query_log
28
29 --connection master
30 CREATE TABLE t(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT,UNIQUE KEY(k)) ENGINE=InnoDB;
31 --disable_warnings
32 INSERT INTO t(k) VALUES (1), (2), (3);
33 INSERT INTO t(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE id=10;
34 --enable_warnings
35 --source include/sync_slave_sql_with_master.inc
36
37 SET SESSION sql_log_bin= 0;
38 CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format*");
39 SET SESSION sql_log_bin= 1;
40
41 --connection master
42 -- let $diff_tables=master:t,slave:t
43 -- source include/diff_tables.inc
44
45 DROP TABLE t;
46 --source include/rpl_end.inc