Debian Codegraph @

mysql-test/suite/galera/t/galera_toi_ddl_error.test

raw
1 --source include/galera_cluster.inc
2 --source include/have_innodb.inc
3 --source include/big_test.inc
4
5 #
6 # Test the operation of DDLs that fail partway through
7 #
8
9 CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
10 INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
11
12 CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
13
14 # Insert 100K rows
15 INSERT INTO t1 (f1) SELECT (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
16
17 # Insert one duplicate value
18 INSERT INTO t1 (f1) SELECT MAX(f1) FROM t1;
19
20 --connection node_2
21 --error ER_DUP_ENTRY
22 ALTER TABLE t1 ADD PRIMARY KEY (f1);
23 SHOW CREATE TABLE t1;
24
25 --connection node_1
26 SHOW CREATE TABLE t1;
27
28 DROP TABLE t1;
29 DROP TABLE ten;
30
31 CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\.");
32
33 --connection node_2
34 CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\.");