blob: ad439024f656c4bff1282c8bf0c1f31cd8cc55e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
##########################################################################
# LP bug #1035225 / MySQL bug #66301: INSERT ... ON DUPLICATE KEY UPDATE +
# innodb_autoinc_lock_mode=1 is broken
##########################################################################
--source include/have_innodb.inc
--source include/have_debug_sync.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
CREATE TABLE t1(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
k INT,
c CHAR(1),
UNIQUE KEY(k)) ENGINE=InnoDB;
--enable_info
--connect(con1, localhost, root)
--connect(con2, localhost, root)
--connection con1
--echo #
--echo # Connection 1
--echo #
SET DEBUG_SYNC='ha_write_row_end SIGNAL continue2 WAIT_FOR continue1';
--send INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1'
--connection con2
--echo #
--echo # Connection 2
--echo #
SET DEBUG_SYNC='start_ha_write_row WAIT_FOR continue2';
SET DEBUG_SYNC='after_mysql_insert SIGNAL continue1';
INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
--connection con1
--reap
--disable_info
SET DEBUG_SYNC='RESET';
SELECT * FROM t1 ORDER BY k;
--disconnect con1
--disconnect con2
--connection default
DROP TABLE t1;
|