mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
56 lines
1.6 KiB
Text
56 lines
1.6 KiB
Text
DROP TABLE IF EXISTS t1, t2;
|
|
DROP TABLE IF EXISTS x1, x2;
|
|
connection node_1;
|
|
CREATE TABLE t1 (f1 INTEGER);
|
|
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
|
|
SET GLOBAL wsrep_replicate_myisam = TRUE;
|
|
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
|
|
CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
|
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
|
INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
|
INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4;
|
|
INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
|
connection node_2;
|
|
# ANALYZE test
|
|
connection node_2;
|
|
connection node_1;
|
|
ANALYZE TABLE t1, t2;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 analyze status OK
|
|
test.t2 analyze status OK
|
|
connection node_2;
|
|
# OPTIMIZE test
|
|
connection node_2;
|
|
connection node_1;
|
|
OPTIMIZE TABLE t1, t2;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
|
test.t1 optimize status OK
|
|
test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
|
|
test.t2 optimize status OK
|
|
connection node_2;
|
|
# REPAIR test
|
|
connection node_2;
|
|
connection node_1;
|
|
REPAIR TABLE x1, x2;
|
|
Table Op Msg_type Msg_text
|
|
test.x1 repair status OK
|
|
test.x2 repair status OK
|
|
connection node_2;
|
|
connection node_2;
|
|
SELECT COUNT(*) = 10 FROM t1;
|
|
COUNT(*) = 10
|
|
1
|
|
SELECT COUNT(*) = 10 FROM x1;
|
|
COUNT(*) = 10
|
|
1
|
|
SELECT COUNT(*) = 10000 FROM t2;
|
|
COUNT(*) = 10000
|
|
1
|
|
SELECT COUNT(*) = 10 FROM x2;
|
|
COUNT(*) = 10
|
|
1
|
|
connection node_1;
|
|
DROP TABLE t1, t2;
|
|
DROP TABLE x1, x2;
|
|
SET GLOBAL wsrep_replicate_myisam = FALSE;
|