Skip to content

Commit e9d805b

Browse files
philip-galeraNirbhay Choubey
authored andcommitted
1 parent d45f0c1 commit e9d805b

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
2+
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
3+
LOCK TABLE t2 WRITE;
4+
OPTIMIZE TABLE t1,t2;;
5+
REPAIR TABLE t1,t2;;
6+
SET SESSION wsrep_sync_wait = 0;
7+
INSERT INTO t2 VALUES (1);
8+
UNLOCK TABLES;
9+
Table Op Msg_type Msg_text
10+
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
11+
test.t1 optimize status OK
12+
test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
13+
test.t2 optimize status OK
14+
Table Op Msg_type Msg_text
15+
test.t1 repair note The storage engine for the table doesn't support repair
16+
test.t2 repair note The storage engine for the table doesn't support repair
17+
DROP TABLE t1;
18+
DROP TABLE t2;
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
--source include/galera_cluster.inc
2+
--source include/have_innodb.inc
3+
--source include/have_binlog_format_row.inc
4+
5+
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
6+
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
7+
8+
--connection node_2
9+
LOCK TABLE t2 WRITE;
10+
11+
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
12+
--connection node_2a
13+
--send OPTIMIZE TABLE t1,t2;
14+
15+
--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
16+
--connection node_2b
17+
--send REPAIR TABLE t1,t2;
18+
19+
--connection node_2
20+
SET SESSION wsrep_sync_wait = 0;
21+
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Waiting for table metadata lock'
22+
--source include/wait_condition.inc
23+
24+
--connection node_1
25+
INSERT INTO t2 VALUES (1);
26+
27+
--connection node_2
28+
UNLOCK TABLES;
29+
30+
--connection node_2a
31+
--reap
32+
33+
--connection node_2b
34+
--reap
35+
36+
DROP TABLE t1;
37+
DROP TABLE t2;

0 commit comments

Comments
 (0)