mirror of
https://github.com/MariaDB/server.git
synced 2025-02-09 23:24:11 +01:00
![Jan Lindström](/assets/img/avatar_default.png)
Introduced two new wsrep_mode options * REPLICATE_MYISAM * REPLICATE_ARIA Depracated wsrep_replicate_myisam parameter and we use wsrep_mode = REPLICATE_MYISAM instead. This required small refactoring of wsrep_check_mode_after_open_table so that both MyISAM and Aria are handled on required DML cases. Similarly, added Aria to wsrep_should_replicate_ddl to handle DDL for Aria tables using TOI. Added test cases and improved MyISAM testing. Changed use of wsrep_replicate_myisam to wsrep_mode = REPLICATE_MYISAM
117 lines
3.4 KiB
Text
117 lines
3.4 KiB
Text
connection node_2;
|
|
connection node_1;
|
|
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_mode = REPLICATE_MYISAM;
|
|
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 Engine-independent statistics collected
|
|
test.t1 analyze status OK
|
|
test.t2 analyze status Engine-independent statistics collected
|
|
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;
|
|
#
|
|
# ARIA
|
|
#
|
|
connection node_1;
|
|
CREATE TABLE t1 (f1 INTEGER);
|
|
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
|
|
SET GLOBAL wsrep_mode = REPLICATE_ARIA;
|
|
CREATE TABLE x1 (f1 INTEGER) ENGINE=ARIA;
|
|
CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=ARIA;
|
|
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 Engine-independent statistics collected
|
|
test.t1 analyze status OK
|
|
test.t2 analyze status Engine-independent statistics collected
|
|
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;
|