summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/insert_into_empty_debug.result
blob: d98748022692c1024b18a4cc389cea354b3996e0 (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
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
PRIMARY KEY(f1))ENGINE=InnoDB;
INSERT INTO t1 VALUES(1, 2), (2, 2);
SET DEBUG_SYNC="innodb_rollback_inplace_alter_table SIGNAL dml_start WAIT_FOR dml_commit";
ALTER TABLE t1 ADD UNIQUE KEY(f2);
connect con1,localhost,root,,,;
SET DEBUG_SYNC="now WAIT_FOR dml_start";
BEGIN;
DELETE FROM t1;
SET DEBUG_SYNC="now SIGNAL dml_commit";
connection default;
ERROR 23000: Duplicate entry '2' for key 'f2'
connection con1;
COMMIT;
TRUNCATE TABLE t1;
SET unique_checks=0, foreign_key_checks=0;
BEGIN;
INSERT INTO t1 VALUES(1, 2);
ROLLBACK;
connection default;
SELECT * FROM t1;
f1	f2
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `f1` int(11) NOT NULL,
  `f2` int(11) NOT NULL,
  PRIMARY KEY (`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
disconnect con1;
DROP TABLE t1;
SET DEBUG_SYNC=RESET;