File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ connection node_2;
2
+ connection node_1;
3
+ CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME);
4
+ SELECT get_lock ('test2', 0);
5
+ get_lock ('test2', 0)
6
+ 1
7
+ DROP TABLE t1;
8
+ CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
9
+ INSERT INTO t1 VALUES (1);
10
+ SET SESSION wsrep_trx_fragment_size=10;
11
+ SET SESSION autocommit=0;
12
+ SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
13
+ c1
14
+ INSERT INTO t1 VALUES (4),(3),(1),(2);
15
+ ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
16
+ CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
17
+ ERROR 42S01: Table 't1' already exists
18
+ ALTER TABLE t1 DROP COLUMN c2;
19
+ ERROR 42000: Can't DROP COLUMN `c2`; check that it exists
20
+ SELECT get_lock ('test', 1.5);
21
+ get_lock ('test', 1.5)
22
+ 1
23
+ DROP TABLE t1;
Original file line number Diff line number Diff line change
1
+ --source include/galera_cluster.inc
2
+ --source include/have_sequence.inc
3
+
4
+ CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME);
5
+ SELECT get_lock ('test2', 0);
6
+ DROP TABLE t1;
7
+ CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
8
+ INSERT INTO t1 VALUES (1);
9
+ SET SESSION wsrep_trx_fragment_size=10;
10
+ SET SESSION autocommit=0;
11
+ SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
12
+ --error ER_LOCK_DEADLOCK
13
+ INSERT INTO t1 VALUES (4),(3),(1),(2);
14
+ --error ER_TABLE_EXISTS_ERROR
15
+ CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
16
+ --error ER_CANT_DROP_FIELD_OR_KEY
17
+ ALTER TABLE t1 DROP COLUMN c2;
18
+ SELECT get_lock ('test', 1.5);
19
+ DROP TABLE t1;
20
+
You can’t perform that action at this time.
0 commit comments