summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/r/galera_insert_multi.result
blob: 913dd42403a1a9c89c1c5e02f7b08364a7ba702e (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
connection node_2;
INSERT INTO t1 VALUES (3),(4);
connection node_1;
SELECT COUNT(*) = 4 FROM t1;
COUNT(*) = 4
1
connection node_2;
SELECT COUNT(*) = 4 FROM t1;
COUNT(*) = 4
1
DROP TABLE t1;
connection node_2;
CREATE TABLE t1 (f1 INTEGER, KEY (f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(1);
connection node_1;
INSERT INTO t1 VALUES (2),(2);
connection node_2;
SELECT COUNT(*) = 4 FROM t1;
COUNT(*) = 4
1
connection node_1;
SELECT COUNT(*) = 4 FROM t1;
COUNT(*) = 4
1
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
connection node_2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT = OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1), (2);
connection node_2;
SET AUTOCOMMIT = OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (2), (1);
connection node_1;
COMMIT;
connection node_2;
COMMIT;
ERROR 40001: Deadlock: wsrep aborted transaction
ROLLBACK;
INSERT INTO t1 VALUES (1), (2);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
START TRANSACTION;
INSERT INTO t1 VALUES (1), (2);
connection node_2;
START TRANSACTION;
INSERT INTO t1 VALUES (2), (1);
connection node_1;
ROLLBACK;
connection node_2;
COMMIT;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
connection node_1;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
DROP TABLE t1;