summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2020-11-03 10:44:26 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2021-02-25 07:47:51 +0200
commit27d66d644cf2ebe9201e0362f2050036cce2908a (patch)
tree8b1dc6ca683c0c0c5cb04d01de7043276f2bcff5 /mysql-test/suite/galera
parent74281fe1fb0faf444aec3744b90995156f9f58f9 (diff)
downloadmariadb-git-27d66d644cf2ebe9201e0362f2050036cce2908a.tar.gz
MENT-411 : Implement wsrep_replicate_aria
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
Diffstat (limited to 'mysql-test/suite/galera')
-rw-r--r--mysql-test/suite/galera/r/galera_admin.result61
-rw-r--r--mysql-test/suite/galera/r/galera_alter_engine_myisam.result15
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_checksum.result5
-rw-r--r--mysql-test/suite/galera/r/galera_can_run_toi.result1
-rw-r--r--mysql-test/suite/galera/r/galera_defaults.result7
-rw-r--r--mysql-test/suite/galera/r/galera_flush_local.result49
-rw-r--r--mysql-test/suite/galera/r/galera_strict_require_innodb.result86
-rw-r--r--mysql-test/suite/galera/r/galera_strict_require_primary_key.result181
-rw-r--r--mysql-test/suite/galera/r/galera_var_replicate_aria_off.result15
-rw-r--r--mysql-test/suite/galera/r/galera_var_replicate_aria_on.result272
-rw-r--r--mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result8
-rw-r--r--mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result87
-rw-r--r--mysql-test/suite/galera/t/binlog_checksum.test1
-rw-r--r--mysql-test/suite/galera/t/galera_admin.test80
-rw-r--r--mysql-test/suite/galera/t/galera_alter_engine_myisam.test28
-rw-r--r--mysql-test/suite/galera/t/galera_binlog_checksum.test10
-rw-r--r--mysql-test/suite/galera/t/galera_can_run_toi.test2
-rw-r--r--mysql-test/suite/galera/t/galera_defaults.test4
-rw-r--r--mysql-test/suite/galera/t/galera_flush_local.test24
-rw-r--r--mysql-test/suite/galera/t/galera_strict_require_innodb.test56
-rw-r--r--mysql-test/suite/galera/t/galera_strict_require_primary_key.test95
-rw-r--r--mysql-test/suite/galera/t/galera_var_replicate_aria_off.test17
-rw-r--r--mysql-test/suite/galera/t/galera_var_replicate_aria_on.test237
-rw-r--r--mysql-test/suite/galera/t/galera_var_replicate_myisam_off.test10
-rw-r--r--mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test65
-rw-r--r--mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test4
26 files changed, 1162 insertions, 258 deletions
diff --git a/mysql-test/suite/galera/r/galera_admin.result b/mysql-test/suite/galera/r/galera_admin.result
index 01e2aac16b2..f733b7b6484 100644
--- a/mysql-test/suite/galera/r/galera_admin.result
+++ b/mysql-test/suite/galera/r/galera_admin.result
@@ -5,7 +5,7 @@ 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;
+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);
@@ -57,4 +57,61 @@ COUNT(*) = 10
connection node_1;
DROP TABLE t1, t2;
DROP TABLE x1, x2;
-SET GLOBAL wsrep_replicate_myisam = FALSE;
+#
+# 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;
diff --git a/mysql-test/suite/galera/r/galera_alter_engine_myisam.result b/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
index b3a9bdd30df..f29c83cad95 100644
--- a/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
+++ b/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
@@ -1,6 +1,6 @@
connection node_2;
connection node_1;
-SET GLOBAL wsrep_replicate_myisam = TRUE;
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
ALTER TABLE t1 ENGINE=InnoDB;
@@ -11,5 +11,18 @@ ENGINE = 'InnoDB'
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
+DROP TABLE t1;
connection node_1;
+SET GLOBAL wsrep_mode = REPLICATE_ARIA;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=ARIA;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ENGINE=InnoDB;
+connection node_2;
+SELECT ENGINE = 'InnoDB' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+ENGINE = 'InnoDB'
+1
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
DROP TABLE t1;
+connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_binlog_checksum.result b/mysql-test/suite/galera/r/galera_binlog_checksum.result
index 3ef7cf5c41e..3bd0bf42f96 100644
--- a/mysql-test/suite/galera/r/galera_binlog_checksum.result
+++ b/mysql-test/suite/galera/r/galera_binlog_checksum.result
@@ -18,8 +18,8 @@ DROP TABLE t1;
# enabled
#
connection node_1;
-SET @@global.wsrep_replicate_myisam=1;
-CREATE TABLE t1 (i INT) ENGINE=MYISAM;
+SET @@global.wsrep_mode = REPLICATE_MYISAM;
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=MYISAM;
INSERT INTO t1 VALUES(1);
connection node_2;
SELECT * FROM t1;
@@ -27,5 +27,4 @@ i
1
connection node_1;
DROP TABLE t1;
-SET @@global.wsrep_replicate_myisam=0;
# End of tests.
diff --git a/mysql-test/suite/galera/r/galera_can_run_toi.result b/mysql-test/suite/galera/r/galera_can_run_toi.result
index fb2fa6675ff..1a3a377f82e 100644
--- a/mysql-test/suite/galera/r/galera_can_run_toi.result
+++ b/mysql-test/suite/galera/r/galera_can_run_toi.result
@@ -25,7 +25,6 @@ SET SESSION default_storage_engine=MyISAM;
SELECT @@default_storage_engine;
@@default_storage_engine
MyISAM
-SET GLOBAL wsrep_replicate_myisam=OFF;
SET GLOBAL wsrep_mode=STRICT_REPLICATION;
CREATE TABLE t3 (c1 VARCHAR(10)) ENGINE=InnoDB;
ALTER TABLE t3 ENGINE=NonExistentEngine;
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index e474c885473..bc9927b21d9 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -1,9 +1,9 @@
connection node_2;
connection node_1;
# Correct Galera library found
-SELECT COUNT(*) `expect 49` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
-expect 49
-50
+SELECT COUNT(*) `expect 51` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
+expect 51
+51
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME LIKE 'wsrep_%'
@@ -40,6 +40,7 @@ WSREP_LOAD_DATA_SPLITTING OFF
WSREP_LOG_CONFLICTS OFF
WSREP_MAX_WS_ROWS 0
WSREP_MAX_WS_SIZE 2147483647
+WSREP_MODE
WSREP_MYSQL_REPLICATION_BUNDLE 0
WSREP_NOTIFY_CMD
WSREP_ON ON
diff --git a/mysql-test/suite/galera/r/galera_flush_local.result b/mysql-test/suite/galera/r/galera_flush_local.result
index 146833fc3c8..66884cd104e 100644
--- a/mysql-test/suite/galera/r/galera_flush_local.result
+++ b/mysql-test/suite/galera/r/galera_flush_local.result
@@ -2,6 +2,7 @@ connection node_2;
connection node_1;
DROP TABLE IF EXISTS t1, t2, x1, x2;
connection node_1;
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
CREATE TABLE t1 (f1 INTEGER);
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
@@ -64,18 +65,18 @@ test.x2 repair status OK
connection node_2;
wsrep_last_committed_diff
1
-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
+SELECT COUNT(*) AS EXPECT_10 FROM t1;
+EXPECT_10
+10
+SELECT COUNT(*) AS EXPECT_10 FROM x1;
+EXPECT_10
+10
+SELECT COUNT(*) AS EXPECT_10000 FROM t2;
+EXPECT_10000
+10000
+SELECT COUNT(*) AS EXPECT_10 FROM x2;
+EXPECT_10
+10
connection node_1;
DROP TABLE t1, t2, x1, x2;
CREATE TABLE t1 (f1 INTEGER);
@@ -143,18 +144,18 @@ wsrep_last_committed_diff
1
wsrep_last_committed_diff2
1
-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
+SELECT COUNT(*) AS EXPECT_10 FROM t1;
+EXPECT_10
+10
+SELECT COUNT(*) AS EXPECT_10 FROM x1;
+EXPECT_10
+10
+SELECT COUNT(*) AS EXPECT_10000 FROM t2;
+EXPECT_10000
+10000
+SELECT COUNT(*) AS EXPECT_10 FROM x2;
+EXPECT_10
+10
connection node_1;
set wsrep_on=1;
DROP TABLE t1, t2, x1, x2;
diff --git a/mysql-test/suite/galera/r/galera_strict_require_innodb.result b/mysql-test/suite/galera/r/galera_strict_require_innodb.result
index 0367a9e0cf7..cc243cd3813 100644
--- a/mysql-test/suite/galera/r/galera_strict_require_innodb.result
+++ b/mysql-test/suite/galera/r/galera_strict_require_innodb.result
@@ -5,37 +5,34 @@ CREATE TABLE t1(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=INNODB;
CREATE TABLE t2(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=MYISAM;
CREATE TABLE t3(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=ARIA;
CREATE TABLE t4(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=MEMORY;
-SET GLOBAL wsrep_replicate_myisam=ON;
SET GLOBAL log_warnings=2;
-SET GLOBAL wsrep_mode= STRICT_REPLICATION;
+SET GLOBAL wsrep_mode = "STRICT_REPLICATION,REPLICATE_MYISAM,REPLICATE_ARIA";
INSERT INTO t1 values (1,'innodb1');
INSERT INTO t2 values (1,'myisam1');
INSERT INTO t3 values (1,'aria1');
-Warnings:
-Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
INSERT INTO t4 values (1,'memory1');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
-SET GLOBAL wsrep_replicate_myisam=OFF;
+SET GLOBAL wsrep_mode = "STRICT_REPLICATION,REPLICATE_ARIA";
INSERT INTO t2 values (2,'myisam2');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MyISAM for table 'test'.'t2' is not supported in Galera
+SET GLOBAL wsrep_mode = "STRICT_REPLICATION,REPLICATE_MYISAM";
+INSERT INTO t3 values (2,'aria2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
SET GLOBAL log_warnings=1;
-INSERT INTO t1 values (2,'innodb2');
+INSERT INTO t1 values (3,'innodb3');
INSERT INTO t2 values (3,'myisam3');
-Warnings:
-Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MyISAM for table 'test'.'t2' is not supported in Galera
-INSERT INTO t3 values (2,'aria2');
+INSERT INTO t3 values (3,'aria3');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
-INSERT INTO t4 values (2,'memory2');
+INSERT INTO t4 values (3,'memory3');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
include/assert_grep.inc [WSREP: wsrep_mode = STRICT_REPLICATION enabled.]
SET GLOBAL log_warnings=2;
INSERT INTO t2 values (4,'myisam3');
-Warnings:
-Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MyISAM for table 'test'.'t2' is not supported in Galera
INSERT INTO t3 values (4,'aria2');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
@@ -43,8 +40,6 @@ INSERT INTO t4 values (4,'memory2');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
INSERT INTO t2 values (5,'myisam3');
-Warnings:
-Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MyISAM for table 'test'.'t2' is not supported in Galera
INSERT INTO t3 values (5,'aria2');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
@@ -52,36 +47,69 @@ INSERT INTO t4 values (5,'memory2');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
INSERT INTO t2 values (6,'myisam3');
-Warnings:
-Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MyISAM for table 'test'.'t2' is not supported in Galera
INSERT INTO t3 values (6,'aria2');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
INSERT INTO t4 values (6,'memory2');
Warnings:
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
+INSERT INTO t2 values (7,'myisam3');
+INSERT INTO t3 values (7,'aria2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
+INSERT INTO t4 values (7,'memory2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
+INSERT INTO t2 values (8,'myisam3');
+INSERT INTO t3 values (8,'aria2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
+INSERT INTO t4 values (8,'memory2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
+INSERT INTO t2 values (9,'myisam3');
+INSERT INTO t3 values (9,'aria2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
+INSERT INTO t4 values (9,'memory2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
+INSERT INTO t2 values (10,'myisam3');
+INSERT INTO t3 values (10,'aria2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
+INSERT INTO t4 values (10,'memory2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
+INSERT INTO t2 values (11,'myisam3');
+INSERT INTO t3 values (11,'aria2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
+INSERT INTO t4 values (11,'memory2');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
SELECT COUNT(*) AS EXPECT_2 FROM t1;
EXPECT_2
2
-SELECT COUNT(*) AS EXPECT_6 FROM t2;
-EXPECT_6
-6
-SELECT COUNT(*) AS EXPECT_5 FROM t3;
-EXPECT_5
-5
-SELECT COUNT(*) AS EXPECT_5 FROM t4;
-EXPECT_5
-5
+SELECT COUNT(*) AS EXPECT_10 FROM t2;
+EXPECT_10
+11
+SELECT COUNT(*) AS EXPECT_10 FROM t3;
+EXPECT_10
+11
+SELECT COUNT(*) AS EXPECT_10 FROM t4;
+EXPECT_10
+10
connection node_2;
SELECT COUNT(*) AS EXPECT_2 FROM t1;
EXPECT_2
2
-SELECT COUNT(*) AS EXPECT_1 FROM t2;
+SELECT COUNT(*) AS EXPECT_10 FROM t2;
+EXPECT_10
+10
+SELECT COUNT(*) AS EXPECT_1 FROM t3;
EXPECT_1
1
-SELECT COUNT(*) AS EXPECT_0 FROM t3;
-EXPECT_0
-0
SELECT COUNT(*) AS EXPECT_0 FROM t4;
EXPECT_0
0
diff --git a/mysql-test/suite/galera/r/galera_strict_require_primary_key.result b/mysql-test/suite/galera/r/galera_strict_require_primary_key.result
index bc644851b3e..4a05f6405ed 100644
--- a/mysql-test/suite/galera/r/galera_strict_require_primary_key.result
+++ b/mysql-test/suite/galera/r/galera_strict_require_primary_key.result
@@ -4,37 +4,43 @@ call mtr.add_suppression("WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Tabl
CREATE TABLE t1(a int, b varchar(50)) ENGINE=INNODB;
CREATE TABLE t2(a int, b varchar(50)) ENGINE=MYISAM;
CREATE TABLE t3(a int, b varchar(50)) ENGINE=MEMORY;
-SET GLOBAL wsrep_replicate_myisam=ON;
+CREATE TABLE t4(a int, b varchar(50)) ENGINE=ARIA;
+SET GLOBAL wsrep_mode = "REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM,REPLICATE_ARIA";
SET GLOBAL log_warnings=2;
-SET GLOBAL wsrep_mode= REQUIRED_PRIMARY_KEY;
INSERT INTO t1 values (1,'test1');
Warnings:
Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
INSERT INTO t2 values (1,'myisam1');
Warnings:
Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
-INSERT INTO t3 values (1,'memory');
-SET GLOBAL wsrep_replicate_myisam=OFF;
-INSERT INTO t2 values (2,'mysam2');
-INSERT INTO t1 values (2,'test2');
+INSERT INTO t3 values (1,'memory1');
+INSERT INTO t4 values (1,'aria1');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+SET GLOBAL wsrep_mode = "REQUIRED_PRIMARY_KEY,REPLICATE_ARIA";
+INSERT INTO t2 values (2,'myisam2');
+SET GLOBAL wsrep_mode = "REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM";
+INSERT INTO t4 values (2,'ARIA2');
+SET GLOBAL wsrep_mode = "REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM,REPLICATE_ARIA";
+SET GLOBAL log_warnings=1;
+INSERT INTO t1 values (21,'not1');
Warnings:
Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
-INSERT INTO t1 values (3,'test3');
+INSERT INTO t1 values (22,'not2');
Warnings:
Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
-INSERT INTO t1 values (4,'test4');
+INSERT INTO t2 values (21,'not1');
Warnings:
-Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
-INSERT INTO t1 values (5,'test5');
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (22,'not2');
Warnings:
-Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
-SET GLOBAL log_warnings=1;
-INSERT INTO t1 values (21,'not1');
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t4 values (21,'not1');
Warnings:
-Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
-INSERT INTO t1 values (22,'not2');
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (22,'not2');
Warnings:
-Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
include/assert_grep.inc [WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled.]
SET GLOBAL log_warnings=2;
INSERT INTO t1 values (6,'test6');
@@ -61,26 +67,143 @@ Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1'
INSERT INTO t1 values (13,'test13');
Warnings:
Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
-SELECT COUNT(*) AS EXPECT_15 FROM t1;
-EXPECT_15
-15
-SELECT COUNT(*) AS EXPECT_2 FROM t2;
-EXPECT_2
-2
+INSERT INTO t1 values (33,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
+INSERT INTO t1 values (34,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
+INSERT INTO t1 values (35,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
+INSERT INTO t1 values (36,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
+INSERT INTO t1 values (37,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
+INSERT INTO t1 values (38,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
+INSERT INTO t1 values (39,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
+INSERT INTO t2 values (6,'test6');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (7,'test7');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (8,'test8');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (9,'test9');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (10,'test10');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (11,'test11');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (12,'test12');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (13,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (33,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (34,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (35,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (36,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (37,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (38,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t2 values (39,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.
+INSERT INTO t4 values (6,'test6');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (7,'test7');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (8,'test8');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (9,'test9');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (10,'test10');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (11,'test11');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (12,'test12');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (13,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (33,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (34,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (35,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (36,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (37,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (38,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+INSERT INTO t4 values (39,'test13');
+Warnings:
+Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t4' should have PRIMARY KEY defined.
+SELECT COUNT(*) AS EXPECT_18 FROM t1;
+EXPECT_18
+18
+SELECT COUNT(*) AS EXPECT_19 FROM t2;
+EXPECT_19
+19
SELECT COUNT(*) AS EXPECT_1 FROM t3;
EXPECT_1
1
+SELECT COUNT(*) AS EXPECT_19 FROM t4;
+EXPECT_19
+19
connection node_2;
-SELECT COUNT(*) AS EXPECT_15 FROM t1;
-EXPECT_15
-15
-SELECT COUNT(*) AS EXPECT_1 FROM t2;
-EXPECT_1
-1
+SELECT COUNT(*) AS EXPECT_18 FROM t1;
+EXPECT_18
+18
+SELECT COUNT(*) AS EXPECT_18 FROM t2;
+EXPECT_18
+18
SELECT COUNT(*) AS EXPECT_0 FROM t3;
EXPECT_0
0
+SELECT COUNT(*) AS EXPECT_18 FROM t4;
+EXPECT_18
+18
connection node_1;
-DROP TABLE t1,t2,t3;
+DROP TABLE t1,t2,t3,t4;
include/assert_grep.inc [WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled.]
include/assert_grep.inc [WSREP: Suppressing warnings of type 'WSREP_REQUIRE_PRIMARY_KEY' for up to 300 seconds because of flooding]
diff --git a/mysql-test/suite/galera/r/galera_var_replicate_aria_off.result b/mysql-test/suite/galera/r/galera_var_replicate_aria_off.result
new file mode 100644
index 00000000000..550df8d35ac
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_replicate_aria_off.result
@@ -0,0 +1,15 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=Aria;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
+f1
+1
+connection node_2;
+# Only DDL is replicated
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+SELECT * FROM t1;
+f1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_var_replicate_aria_on.result b/mysql-test/suite/galera/r/galera_var_replicate_aria_on.result
new file mode 100644
index 00000000000..39fd748314c
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_replicate_aria_on.result
@@ -0,0 +1,272 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET GLOBAL wsrep_mode = REPLICATE_ARIA;
+connection node_2;
+SET GLOBAL wsrep_mode = REPLICATE_ARIA;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=Aria;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2), (3);
+INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
+connection node_2;
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+EXPECT_5
+5
+connection node_1;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(100)) ENGINE=Aria;
+INSERT INTO t1 VALUES (1, 'abc'),(2,'abc'), (3, 'xxx');
+REPLACE INTO t1 VALUES (1, 'klm'), (2,'xyz');
+REPLACE INTO t1 SELECT 3, 'yyy' FROM DUAL;
+SELECT * FROM t1;
+f1 f2
+1 klm
+2 xyz
+3 yyy
+connection node_2;
+SELECT COUNT(*) AS EXPECT_3 FROM t1;
+EXPECT_3
+3
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 1 AND f2 = 'klm';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 2 AND f2 = 'xyz';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 3 AND f2 = 'yyy';
+EXPECT_1
+1
+SELECT * FROM t1;
+f1 f2
+1 klm
+2 xyz
+3 yyy
+connection node_1;
+UPDATE t1 SET f2 = 'zzz' WHERE f2 = 'yyy';
+SELECT * FROM t1;
+f1 f2
+1 klm
+2 xyz
+3 zzz
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'zzz';
+EXPECT_1
+1
+SELECT * FROM t1;
+f1 f2
+1 klm
+2 xyz
+3 zzz
+connection node_1;
+DELETE FROM t1 WHERE f2 = 'zzz';
+SELECT * FROM t1;
+f1 f2
+1 klm
+2 xyz
+connection node_2;
+SELECT COUNT(*) AS EXPECT_0 FROM t1 WHERE f2 = 'zzz';
+EXPECT_0
+0
+SELECT * FROM t1;
+f1 f2
+1 klm
+2 xyz
+connection node_1;
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+f1 f2
+connection node_2;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+SELECT * FROM t1;
+f1 f2
+connection node_1;
+DROP TABLE t1;
+connection node_1;
+SET GLOBAL wsrep_sync_wait=15;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=Aria;
+CREATE TABLE t2 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+COMMIT;
+connection node_2;
+SET GLOBAL wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
+EXPECT_1
+1
+connection node_1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+INSERT INTO t2 VALUES (2);
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+connection node_2;
+SELECT COUNT(*) AS EXPECT_2 FROM t1;
+EXPECT_2
+2
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
+EXPECT_1
+1
+connection node_1;
+DROP TABLE t1,t2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=Aria;
+CREATE TABLE t2 (f2 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+connection node_2;
+INSERT INTO t1 VALUES (1);
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+connection node_1;
+COMMIT;
+DROP TABLE t1,t2;
+connection node_1;
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t1 VALUES(1);
+SELECT * FROM t1;
+i
+1
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=Aria;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+PREPARE upd from 'update t1 set b = 100 where id = 5';
+PREPARE ins from 'insert into t1 values (11,11)';
+PREPARE del from 'delete from t1 where id = 4';
+PREPARE rep from 'replace into t1 values (12,12),(6,600)';
+EXECUTE upd;
+EXECUTE ins;
+EXECUTE del;
+EXECUTE rep;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 2
+3 3
+5 100
+6 600
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+connection node_2;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 2
+3 3
+5 100
+6 600
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+connection node_1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=Aria;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+CREATE PROCEDURE proc()
+BEGIN
+UPDATE t1 set b = 100 WHERE id = 5;
+INSERT INTO t1 VALUES (11,11);
+DELETE FROM t1 WHERE id = 4;
+REPLACE INTO t1 VALUES (12,12),(6,600);
+COMMIT;
+END|
+CALL proc();
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 2
+3 3
+5 100
+6 600
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+connection node_2;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 2
+3 3
+5 100
+6 600
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+connection node_1;
+DROP PROCEDURE proc;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=Aria;
+CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT) ENGINE=Aria;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, NEW.b);
+CREATE TRIGGER tr2 BEFORE UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b),(NULL, NEW.b);
+CREATE TRIGGER tr3 BEFORE DELETE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b);
+INSERT INTO t1 VALUES (11,11);
+UPDATE t1 SET b = 200 WHERE id = 2;
+DELETE FROM t1 where id = 5;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 200
+3 3
+4 4
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+SELECT * FROM t2 ORDER BY id;
+id b
+1 11
+2 2
+3 200
+4 5
+connection node_2;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 200
+3 3
+4 4
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+SELECT * FROM t2 ORDER BY id;
+id b
+1 11
+2 2
+3 200
+4 5
+connection node_1;
+DROP TRIGGER tr1;
+DROP TRIGGER tr2;
+DROP TRIGGER tr3;
+DROP TABLE t1,t2;
diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
index 8968f89d11b..33722ba0dc8 100644
--- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
+++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
@@ -1,12 +1,10 @@
connection node_2;
connection node_1;
-SET GLOBAL wsrep_replicate_myisam = FALSE;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=MyISAM;
INSERT INTO t1 VALUES (1);
connection node_2;
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
connection node_1;
-SET GLOBAL wsrep_replicate_myisam = 0;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
index ad28f5a426e..d8463f6732f 100644
--- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
+++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
@@ -1,19 +1,18 @@
connection node_2;
connection node_1;
connection node_1;
-connection node_1;
-SET GLOBAL wsrep_replicate_myisam = TRUE;
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
connection node_2;
-SET GLOBAL wsrep_replicate_myisam = TRUE;
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=MyISAM;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2), (3);
INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
connection node_2;
-SELECT COUNT(*) = 5 FROM t1;
-COUNT(*) = 5
-1
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+EXPECT_5
+5
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(100)) ENGINE=MyISAM;
@@ -21,36 +20,36 @@ INSERT INTO t1 VALUES (1, 'abc'),(2,'abc'), (3, 'xxx');
REPLACE INTO t1 VALUES (1, 'klm'), (2,'xyz');
REPLACE INTO t1 SELECT 3, 'yyy' FROM DUAL;
connection node_2;
-SELECT COUNT(*) = 3 FROM t1;
-COUNT(*) = 3
+SELECT COUNT(*) AS EXPECT_3 FROM t1;
+EXPECT_3
+3
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 1 AND f2 = 'klm';
+EXPECT_1
1
-SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1 AND f2 = 'klm';
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 2 AND f2 = 'xyz';
+EXPECT_1
1
-SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2 AND f2 = 'xyz';
-COUNT(*) = 1
-1
-SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3 AND f2 = 'yyy';
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 3 AND f2 = 'yyy';
+EXPECT_1
1
connection node_1;
UPDATE t1 SET f2 = 'zzz' WHERE f2 = 'yyy';
connection node_2;
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'zzz';
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'zzz';
+EXPECT_1
1
connection node_1;
DELETE FROM t1 WHERE f2 = 'zzz';
connection node_2;
-SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'zzz';
-COUNT(*) = 0
-1
+SELECT COUNT(*) AS EXPECT_0 FROM t1 WHERE f2 = 'zzz';
+EXPECT_0
+0
connection node_1;
TRUNCATE TABLE t1;
connection node_2;
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
@@ -61,11 +60,11 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
COMMIT;
connection node_2;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
1
-SELECT COUNT(*) = 1 FROM t2;
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
+EXPECT_1
1
connection node_1;
START TRANSACTION;
@@ -75,11 +74,11 @@ ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
connection node_2;
-SELECT COUNT(*) = 2 FROM t1;
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 1 FROM t2;
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_2 FROM t1;
+EXPECT_2
+2
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
+EXPECT_1
1
DROP TABLE t1;
DROP TABLE t2;
@@ -94,18 +93,7 @@ INSERT INTO t1 VALUES (1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
connection node_1;
COMMIT;
-DROP TABLE t1;
-DROP TABLE t2;
-#
-# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
-#
-connection node_1;
-CREATE TABLE t1 (i INT) ENGINE=INNODB;
-INSERT INTO t1 VALUES(1);
-SELECT * FROM t1;
-i
-1
-DROP TABLE t1;
+DROP TABLE t1, t2;
connection node_1;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM;
INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
@@ -237,5 +225,14 @@ DROP TRIGGER tr1;
DROP TRIGGER tr2;
DROP TRIGGER tr3;
DROP TABLE t1,t2;
+#
+# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
+#
+connection node_1;
+CREATE TABLE t1 (i INT) ENGINE=INNODB;
+INSERT INTO t1 VALUES(1);
+SELECT * FROM t1;
+i
+1
+DROP TABLE t1;
connection node_1;
-connection node_2;
diff --git a/mysql-test/suite/galera/t/binlog_checksum.test b/mysql-test/suite/galera/t/binlog_checksum.test
index 5aab68a7746..8f6091235a1 100644
--- a/mysql-test/suite/galera/t/binlog_checksum.test
+++ b/mysql-test/suite/galera/t/binlog_checksum.test
@@ -1,5 +1,4 @@
--source include/galera_cluster.inc
---source include/have_innodb.inc
--echo # On node_1
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_admin.test b/mysql-test/suite/galera/t/galera_admin.test
index e3c43256ad5..d630af0025b 100644
--- a/mysql-test/suite/galera/t/galera_admin.test
+++ b/mysql-test/suite/galera/t/galera_admin.test
@@ -5,7 +5,7 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/have_aria.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
@@ -15,7 +15,7 @@ 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;
+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);
@@ -34,7 +34,6 @@ INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
--let $wait_condition = SELECT COUNT(*) = 10000 FROM t2;
--source include/wait_condition.inc
-
--echo # ANALYZE test
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
@@ -46,8 +45,6 @@ ANALYZE TABLE t1, t2;
--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--source include/wait_condition.inc
-
-
--echo # OPTIMIZE test
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
@@ -59,8 +56,6 @@ OPTIMIZE TABLE t1, t2;
--let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--source include/wait_condition.inc
-
-
--echo # REPAIR test
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
@@ -72,7 +67,73 @@ REPAIR TABLE x1, x2;
--let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
--source include/wait_condition.inc
+--connection node_2
+SELECT COUNT(*) = 10 FROM t1;
+SELECT COUNT(*) = 10 FROM x1;
+SELECT COUNT(*) = 10000 FROM t2;
+SELECT COUNT(*) = 10 FROM x2;
+
+--connection node_1
+DROP TABLE t1, t2;
+DROP TABLE x1, x2;
+
+--echo #
+--echo # ARIA
+--echo #
+--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);
+
+# Wait until all the data from t2 has been replicated
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 10 FROM x1;
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 10 FROM x2;
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 10 FROM t1;
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 10000 FROM t2;
+--source include/wait_condition.inc
+
+--echo # ANALYZE test
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+ANALYZE TABLE t1, t2;
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+--echo # OPTIMIZE test
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+OPTIMIZE TABLE t1, t2;
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+--echo # REPAIR test
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+REPAIR TABLE x1, x2;
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
--connection node_2
SELECT COUNT(*) = 10 FROM t1;
@@ -83,4 +144,7 @@ SELECT COUNT(*) = 10 FROM x2;
--connection node_1
DROP TABLE t1, t2;
DROP TABLE x1, x2;
-SET GLOBAL wsrep_replicate_myisam = FALSE;
+
+--disable_query_log
+SET GLOBAL wsrep_mode = DEFAULT;
+--enable_query_log
diff --git a/mysql-test/suite/galera/t/galera_alter_engine_myisam.test b/mysql-test/suite/galera/t/galera_alter_engine_myisam.test
index 6d41d276a17..57c057f9869 100644
--- a/mysql-test/suite/galera/t/galera_alter_engine_myisam.test
+++ b/mysql-test/suite/galera/t/galera_alter_engine_myisam.test
@@ -1,12 +1,11 @@
--source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/have_aria.inc
#
-# Test ALTER ENGINE from MyISAM to InnoDB under wsrep_replicate_myisam
+# Test ALTER ENGINE from MyISAM to InnoDB under REPLICATE_MYISAM
#
---let $wsrep_replicate_myisam_orig = `SELECT @@wsrep_replicate_myisam`
-SET GLOBAL wsrep_replicate_myisam = TRUE;
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
@@ -16,10 +15,27 @@ ALTER TABLE t1 ENGINE=InnoDB;
--connection node_2
SELECT ENGINE = 'InnoDB' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
SELECT COUNT(*) = 1 FROM t1;
+DROP TABLE t1;
+
+#
+# Test ALTER ENGINE from Aria to InnoDB under REPLICATE_ARIA
+#
+
+--connection node_1
+SET GLOBAL wsrep_mode = REPLICATE_ARIA;
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=ARIA;
+INSERT INTO t1 VALUES (1);
+
+ALTER TABLE t1 ENGINE=InnoDB;
+
+--connection node_2
+SELECT ENGINE = 'InnoDB' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+SELECT COUNT(*) = 1 FROM t1;
+DROP TABLE t1;
--connection node_1
--disable_query_log
---eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig
+SET GLOBAL wsrep_mode = DEFAULT;
--enable_query_log
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_binlog_checksum.test b/mysql-test/suite/galera/t/galera_binlog_checksum.test
index 09d7a02f312..12fb87a618c 100644
--- a/mysql-test/suite/galera/t/galera_binlog_checksum.test
+++ b/mysql-test/suite/galera/t/galera_binlog_checksum.test
@@ -27,10 +27,9 @@ DROP TABLE t1;
--echo #
--connection node_1
-let $wsrep_replicate_myisam_saved= `SELECT @@wsrep_replicate_myisam`;
-SET @@global.wsrep_replicate_myisam=1;
+SET @@global.wsrep_mode = REPLICATE_MYISAM;
-CREATE TABLE t1 (i INT) ENGINE=MYISAM;
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=MYISAM;
INSERT INTO t1 VALUES(1);
--connection node_2
@@ -38,6 +37,9 @@ SELECT * FROM t1;
--connection node_1
DROP TABLE t1;
-eval SET @@global.wsrep_replicate_myisam=$wsrep_replicate_myisam_saved;
+
+--disable_query_log
+SET @@global.wsrep_mode=DEFAULT;
+--enable_query_log
--echo # End of tests.
diff --git a/mysql-test/suite/galera/t/galera_can_run_toi.test b/mysql-test/suite/galera/t/galera_can_run_toi.test
index 060ea887692..e73eb46c0d7 100644
--- a/mysql-test/suite/galera/t/galera_can_run_toi.test
+++ b/mysql-test/suite/galera/t/galera_can_run_toi.test
@@ -18,7 +18,6 @@ DROP TABLE t3;
SET sql_mode='';
SET SESSION default_storage_engine=MyISAM;
SELECT @@default_storage_engine;
-SET GLOBAL wsrep_replicate_myisam=OFF;
SET GLOBAL wsrep_mode=STRICT_REPLICATION;
CREATE TABLE t3 (c1 VARCHAR(10)) ENGINE=InnoDB;
--error ER_GALERA_REPLICATION_NOT_SUPPORTED
@@ -29,6 +28,5 @@ DROP TABLE t3;
--disable_query_log
SET GLOBAL sql_mode=default;
SET GLOBAL default_storage_engine=default;
-SET GLOBAL wsrep_replicate_myisam=default;
SET GLOBAL wsrep_mode=default;
--enable_query_log
diff --git a/mysql-test/suite/galera/t/galera_defaults.test b/mysql-test/suite/galera/t/galera_defaults.test
index 28e6f0cce38..96389e44d3f 100644
--- a/mysql-test/suite/galera/t/galera_defaults.test
+++ b/mysql-test/suite/galera/t/galera_defaults.test
@@ -13,12 +13,12 @@
--source include/force_restart.inc
# Make sure that the test is operating on the right version of galera library.
---let $galera_version=26.4.6
+--let $galera_version=26.4.7
source ../wsrep/include/check_galera_version.inc;
# Global Variables
-SELECT COUNT(*) `expect 49` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
+SELECT COUNT(*) `expect 51` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/galera/t/galera_flush_local.test b/mysql-test/suite/galera/t/galera_flush_local.test
index 24acd9ec4ff..207ce0ceae0 100644
--- a/mysql-test/suite/galera/t/galera_flush_local.test
+++ b/mysql-test/suite/galera/t/galera_flush_local.test
@@ -3,9 +3,7 @@
# PXC-391
--source include/galera_cluster.inc
---source include/have_innodb.inc
--source include/have_query_cache.inc
---source include/have_wsrep_replicate_myisam.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2, x1, x2;
@@ -14,6 +12,7 @@ DROP TABLE IF EXISTS t1, t2, x1, x2;
# The following FLUSH LOCAL statements should *not* be replicated
#
--connection node_1
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
CREATE TABLE t1 (f1 INTEGER);
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
@@ -68,10 +67,10 @@ REPAIR LOCAL TABLE x1, x2;
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
-SELECT COUNT(*) = 10 FROM t1;
-SELECT COUNT(*) = 10 FROM x1;
-SELECT COUNT(*) = 10000 FROM t2;
-SELECT COUNT(*) = 10 FROM x2;
+SELECT COUNT(*) AS EXPECT_10 FROM t1;
+SELECT COUNT(*) AS EXPECT_10 FROM x1;
+SELECT COUNT(*) AS EXPECT_10000 FROM t2;
+SELECT COUNT(*) AS EXPECT_10 FROM x2;
--connection node_1
@@ -133,11 +132,16 @@ REPAIR TABLE x1, x2;
--eval SELECT $wsrep_last_committed_after2 = $wsrep_last_committed_before + 9 AS wsrep_last_committed_diff2;
--enable_query_log
-SELECT COUNT(*) = 10 FROM t1;
-SELECT COUNT(*) = 10 FROM x1;
-SELECT COUNT(*) = 10000 FROM t2;
-SELECT COUNT(*) = 10 FROM x2;
+SELECT COUNT(*) AS EXPECT_10 FROM t1;
+SELECT COUNT(*) AS EXPECT_10 FROM x1;
+SELECT COUNT(*) AS EXPECT_10000 FROM t2;
+SELECT COUNT(*) AS EXPECT_10 FROM x2;
--connection node_1
set wsrep_on=1;
DROP TABLE t1, t2, x1, x2;
+
+--disable_query_log
+SET GLOBAL wsrep_mode = DEFAULT;
+--enable_query_log
+
diff --git a/mysql-test/suite/galera/t/galera_strict_require_innodb.test b/mysql-test/suite/galera/t/galera_strict_require_innodb.test
index b4fe74d3406..b627fffe70c 100644
--- a/mysql-test/suite/galera/t/galera_strict_require_innodb.test
+++ b/mysql-test/suite/galera/t/galera_strict_require_innodb.test
@@ -3,14 +3,16 @@
# not supported by Galera
#
# For MyISAM
-# * push warning to client if wsrep_mode == STRICT_REPLICATION and wsrep_replicate_myisam=off
+# * push warning to client if wsrep_mode == STRICT_REPLICATION,REPLICATE_MYISAM
+# * push warning to error log if log_warnings > 1
+# For Aria
+# * push warning to client if wsrep_mode == STRICT_REPLICATION,REPLICATE_ARIA
# * push warning to error log if log_warnings > 1
# For Memory
# * push warning to client if wsrep_mode == STRICT_REPLICATION
# * push warning to error log if log_warnings > 1
-# ( Note here Aria and case wsrep_replicate_aria=ON)
#
-# In both cases apply flood control if > 10 same warning
+# In both cases apply flood control if >= 10 same warning
#
--source include/galera_cluster.inc
--source include/have_aria.inc
@@ -22,31 +24,35 @@ CREATE TABLE t2(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=MYISAM;
CREATE TABLE t3(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=ARIA;
CREATE TABLE t4(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=MEMORY;
-SET GLOBAL wsrep_replicate_myisam=ON;
SET GLOBAL log_warnings=2;
-SET GLOBAL wsrep_mode= STRICT_REPLICATION;
+SET GLOBAL wsrep_mode = "STRICT_REPLICATION,REPLICATE_MYISAM,REPLICATE_ARIA";
INSERT INTO t1 values (1,'innodb1');
INSERT INTO t2 values (1,'myisam1');
INSERT INTO t3 values (1,'aria1');
INSERT INTO t4 values (1,'memory1');
-SET GLOBAL wsrep_replicate_myisam=OFF;
+# these should not replicate
+SET GLOBAL wsrep_mode = "STRICT_REPLICATION,REPLICATE_ARIA";
INSERT INTO t2 values (2,'myisam2');
+SET GLOBAL wsrep_mode = "STRICT_REPLICATION,REPLICATE_MYISAM";
+INSERT INTO t3 values (2,'aria2');
+# no warning to error log
SET GLOBAL log_warnings=1;
-INSERT INTO t1 values (2,'innodb2');
+INSERT INTO t1 values (3,'innodb3');
INSERT INTO t2 values (3,'myisam3');
-INSERT INTO t3 values (2,'aria2');
-INSERT INTO t4 values (2,'memory2');
+INSERT INTO t3 values (3,'aria3');
+INSERT INTO t4 values (3,'memory3');
-# test flood control
+# test warnings
--let $assert_count = 3
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_text = WSREP: wsrep_mode = STRICT_REPLICATION enabled.
--let $assert_select = WSREP: wsrep_mode = STRICT_REPLICATION enabled.
--source include/assert_grep.inc
+# force flood
SET GLOBAL log_warnings=2;
INSERT INTO t2 values (4,'myisam3');
INSERT INTO t3 values (4,'aria2');
@@ -57,16 +63,31 @@ INSERT INTO t4 values (5,'memory2');
INSERT INTO t2 values (6,'myisam3');
INSERT INTO t3 values (6,'aria2');
INSERT INTO t4 values (6,'memory2');
+INSERT INTO t2 values (7,'myisam3');
+INSERT INTO t3 values (7,'aria2');
+INSERT INTO t4 values (7,'memory2');
+INSERT INTO t2 values (8,'myisam3');
+INSERT INTO t3 values (8,'aria2');
+INSERT INTO t4 values (8,'memory2');
+INSERT INTO t2 values (9,'myisam3');
+INSERT INTO t3 values (9,'aria2');
+INSERT INTO t4 values (9,'memory2');
+INSERT INTO t2 values (10,'myisam3');
+INSERT INTO t3 values (10,'aria2');
+INSERT INTO t4 values (10,'memory2');
+INSERT INTO t2 values (11,'myisam3');
+INSERT INTO t3 values (11,'aria2');
+INSERT INTO t4 values (11,'memory2');
SELECT COUNT(*) AS EXPECT_2 FROM t1;
-SELECT COUNT(*) AS EXPECT_6 FROM t2;
-SELECT COUNT(*) AS EXPECT_5 FROM t3;
-SELECT COUNT(*) AS EXPECT_5 FROM t4;
+SELECT COUNT(*) AS EXPECT_10 FROM t2;
+SELECT COUNT(*) AS EXPECT_10 FROM t3;
+SELECT COUNT(*) AS EXPECT_10 FROM t4;
--connection node_2
SELECT COUNT(*) AS EXPECT_2 FROM t1;
-SELECT COUNT(*) AS EXPECT_1 FROM t2;
-SELECT COUNT(*) AS EXPECT_0 FROM t3;
+SELECT COUNT(*) AS EXPECT_10 FROM t2;
+SELECT COUNT(*) AS EXPECT_1 FROM t3;
SELECT COUNT(*) AS EXPECT_0 FROM t4;
--connection node_1
@@ -76,19 +97,20 @@ DROP TABLE t1,t2,t3,t4;
#
# Verify no flood
#
---let $assert_count = 10
+--let $assert_count =
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_text = WSREP: wsrep_mode = STRICT_REPLICATION enabled.
--let $assert_select = WSREP: wsrep_mode = STRICT_REPLICATION enabled.
+--let $assert_match = WSREP: wsrep_mode = STRICT_REPLICATION enabled.
--source include/assert_grep.inc
--let $assert_count = 1
--let $assert_text = WSREP: Suppressing warnings of type 'WSREP_REQUIRE_INNODB' for up to 300 seconds because of flooding
--let $assert_select = WSREP: Suppressing warnings of type 'WSREP_REQUIRE_INNODB' for up to 300 seconds because of flooding
+--let $assert_match =
--source include/assert_grep.inc
# reset env
--disable_query_log
-SET GLOBAL wsrep_replicate_myisam=DEFAULT;
SET GLOBAL log_warnings=DEFAULT;
SET GLOBAL wsrep_mode=DEFAULT;
--disable_query_log
diff --git a/mysql-test/suite/galera/t/galera_strict_require_primary_key.test b/mysql-test/suite/galera/t/galera_strict_require_primary_key.test
index 3a94c408fb6..dc5f9910396 100644
--- a/mysql-test/suite/galera/t/galera_strict_require_primary_key.test
+++ b/mysql-test/suite/galera/t/galera_strict_require_primary_key.test
@@ -5,41 +5,49 @@
# * push warning to client if wsrep_mode == REQUIRED_PRIMARY_KEY
# * push warning to error log if log_warnings > 1
# For MyIsam
-# * push warning if wsrep_replicate_myisam=ON
+# * push warning to client if wsrep_mode == REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM
+# * push warning to error log if log_warnings > 1
+# For Aria
+# * push warning to client if wsrep_mode == REQUIRED_PRIMARY_KEY,REPLICATE_ARIA
+# * push warning to error log if log_warnings > 1
#
-# In both cases apply flood control if > 10 same warning
+# In both cases apply flood control if >= 10 same warning
#
--source include/galera_cluster.inc
+--source include/have_aria.inc
call mtr.add_suppression("WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table .*");
CREATE TABLE t1(a int, b varchar(50)) ENGINE=INNODB;
CREATE TABLE t2(a int, b varchar(50)) ENGINE=MYISAM;
CREATE TABLE t3(a int, b varchar(50)) ENGINE=MEMORY;
+CREATE TABLE t4(a int, b varchar(50)) ENGINE=ARIA;
-SET GLOBAL wsrep_replicate_myisam=ON;
+SET GLOBAL wsrep_mode = "REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM,REPLICATE_ARIA";
SET GLOBAL log_warnings=2;
-SET GLOBAL wsrep_mode= REQUIRED_PRIMARY_KEY;
INSERT INTO t1 values (1,'test1');
INSERT INTO t2 values (1,'myisam1');
-INSERT INTO t3 values (1,'memory');
+INSERT INTO t3 values (1,'memory1');
+INSERT INTO t4 values (1,'aria1');
-SET GLOBAL wsrep_replicate_myisam=OFF;
-INSERT INTO t2 values (2,'mysam2');
-
-# test flood control
-INSERT INTO t1 values (2,'test2');
-INSERT INTO t1 values (3,'test3');
-INSERT INTO t1 values (4,'test4');
-INSERT INTO t1 values (5,'test5');
+# these will not replicate
+SET GLOBAL wsrep_mode = "REQUIRED_PRIMARY_KEY,REPLICATE_ARIA";
+INSERT INTO t2 values (2,'myisam2');
+SET GLOBAL wsrep_mode = "REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM";
+INSERT INTO t4 values (2,'ARIA2');
# these should not write warning to error log
+SET GLOBAL wsrep_mode = "REQUIRED_PRIMARY_KEY,REPLICATE_MYISAM,REPLICATE_ARIA";
SET GLOBAL log_warnings=1;
INSERT INTO t1 values (21,'not1');
INSERT INTO t1 values (22,'not2');
+INSERT INTO t2 values (21,'not1');
+INSERT INTO t2 values (22,'not2');
+INSERT INTO t4 values (21,'not1');
+INSERT INTO t4 values (22,'not2');
---let $assert_count = 6
+--let $assert_count = 3
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_text = WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled.
--let $assert_select = WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled.
@@ -56,34 +64,79 @@ INSERT INTO t1 values (11,'test11');
INSERT INTO t1 values (12,'test12');
INSERT INTO t1 values (13,'test13');
-SELECT COUNT(*) AS EXPECT_15 FROM t1;
-SELECT COUNT(*) AS EXPECT_2 FROM t2;
+INSERT INTO t1 values (33,'test13');
+INSERT INTO t1 values (34,'test13');
+INSERT INTO t1 values (35,'test13');
+INSERT INTO t1 values (36,'test13');
+INSERT INTO t1 values (37,'test13');
+INSERT INTO t1 values (38,'test13');
+INSERT INTO t1 values (39,'test13');
+
+INSERT INTO t2 values (6,'test6');
+INSERT INTO t2 values (7,'test7');
+INSERT INTO t2 values (8,'test8');
+INSERT INTO t2 values (9,'test9');
+INSERT INTO t2 values (10,'test10');
+INSERT INTO t2 values (11,'test11');
+INSERT INTO t2 values (12,'test12');
+INSERT INTO t2 values (13,'test13');
+
+INSERT INTO t2 values (33,'test13');
+INSERT INTO t2 values (34,'test13');
+INSERT INTO t2 values (35,'test13');
+INSERT INTO t2 values (36,'test13');
+INSERT INTO t2 values (37,'test13');
+INSERT INTO t2 values (38,'test13');
+INSERT INTO t2 values (39,'test13');
+
+INSERT INTO t4 values (6,'test6');
+INSERT INTO t4 values (7,'test7');
+INSERT INTO t4 values (8,'test8');
+INSERT INTO t4 values (9,'test9');
+INSERT INTO t4 values (10,'test10');
+INSERT INTO t4 values (11,'test11');
+INSERT INTO t4 values (12,'test12');
+INSERT INTO t4 values (13,'test13');
+
+INSERT INTO t4 values (33,'test13');
+INSERT INTO t4 values (34,'test13');
+INSERT INTO t4 values (35,'test13');
+INSERT INTO t4 values (36,'test13');
+INSERT INTO t4 values (37,'test13');
+INSERT INTO t4 values (38,'test13');
+INSERT INTO t4 values (39,'test13');
+
+SELECT COUNT(*) AS EXPECT_18 FROM t1;
+SELECT COUNT(*) AS EXPECT_19 FROM t2;
SELECT COUNT(*) AS EXPECT_1 FROM t3;
+SELECT COUNT(*) AS EXPECT_19 FROM t4;
--connection node_2
-SELECT COUNT(*) AS EXPECT_15 FROM t1;
-SELECT COUNT(*) AS EXPECT_1 FROM t2;
+SELECT COUNT(*) AS EXPECT_18 FROM t1;
+SELECT COUNT(*) AS EXPECT_18 FROM t2;
SELECT COUNT(*) AS EXPECT_0 FROM t3;
+SELECT COUNT(*) AS EXPECT_18 FROM t4;
--connection node_1
-DROP TABLE t1,t2,t3;
+DROP TABLE t1,t2,t3,t4;
#
# Verify warning is on error log and check that no flood
#
---let $assert_count = 9
+--let $assert_count =
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_text = WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled.
--let $assert_select = WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled.
+--let $assert_match = WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled.
--source include/assert_grep.inc
--let $assert_count = 1
--let $assert_text = WSREP: Suppressing warnings of type 'WSREP_REQUIRE_PRIMARY_KEY' for up to 300 seconds because of flooding
--let $assert_select = WSREP: Suppressing warnings of type 'WSREP_REQUIRE_PRIMARY_KEY' for up to 300 seconds because of flooding
+--let $assert_match =
--source include/assert_grep.inc
# reset env
--disable_query_log
-SET GLOBAL wsrep_replicate_myisam=DEFAULT;
SET GLOBAL log_warnings=DEFAULT;
SET GLOBAL wsrep_mode=DEFAULT;
--disable_query_log
diff --git a/mysql-test/suite/galera/t/galera_var_replicate_aria_off.test b/mysql-test/suite/galera/t/galera_var_replicate_aria_off.test
new file mode 100644
index 00000000000..c0d8c5d6b3b
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_replicate_aria_off.test
@@ -0,0 +1,17 @@
+#
+# Simple test for wsrep-mode != REPLICATE_ARIA
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_aria.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=Aria;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
+
+--connection node_2
+--echo # Only DDL is replicated
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_replicate_aria_on.test b/mysql-test/suite/galera/t/galera_var_replicate_aria_on.test
new file mode 100644
index 00000000000..c3bc53ee17f
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_replicate_aria_on.test
@@ -0,0 +1,237 @@
+#
+# Simple test for wsrep-mode = REPLICATE_ARIA
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_aria.inc
+
+--connection node_1
+SET GLOBAL wsrep_mode = REPLICATE_ARIA;
+--connection node_2
+SET GLOBAL wsrep_mode = REPLICATE_ARIA;
+
+#
+# Simple INSERT
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=Aria;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2), (3);
+INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+
+#
+# REPLACE
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(100)) ENGINE=Aria;
+INSERT INTO t1 VALUES (1, 'abc'),(2,'abc'), (3, 'xxx');
+REPLACE INTO t1 VALUES (1, 'klm'), (2,'xyz');
+REPLACE INTO t1 SELECT 3, 'yyy' FROM DUAL;
+SELECT * FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_3 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 1 AND f2 = 'klm';
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 2 AND f2 = 'xyz';
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 3 AND f2 = 'yyy';
+SELECT * FROM t1;
+
+#
+# UPDATE
+#
+
+--connection node_1
+UPDATE t1 SET f2 = 'zzz' WHERE f2 = 'yyy';
+SELECT * FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'zzz';
+SELECT * FROM t1;
+
+#
+# DELETE
+#
+
+--connection node_1
+DELETE FROM t1 WHERE f2 = 'zzz';
+SELECT * FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_0 FROM t1 WHERE f2 = 'zzz';
+SELECT * FROM t1;
+
+#
+# TRUNCATE
+#
+
+--connection node_1
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+SELECT * FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+
+#
+# Transaction
+#
+
+--connection node_1
+SET GLOBAL wsrep_sync_wait=15;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=Aria;
+CREATE TABLE t2 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+COMMIT;
+
+--connection node_2
+SET GLOBAL wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
+
+#
+# Transaction rollback
+#
+
+--connection node_1
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+INSERT INTO t2 VALUES (2);
+ROLLBACK;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_2 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
+
+--connection node_1
+DROP TABLE t1,t2;
+
+#
+# Transaction conflict
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=Aria;
+CREATE TABLE t2 (f2 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+
+--connection node_2
+# The Aria update is replicated immediately, so a duplicate key error happens even before the COMMIT
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+COMMIT;
+
+DROP TABLE t1,t2;
+
+--connection node_1
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t1 VALUES(1);
+# This command should not get replicated.
+SELECT * FROM t1;
+DROP TABLE t1;
+
+#
+# Test prepared staments
+#
+--connection node_1
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=Aria;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+
+PREPARE upd from 'update t1 set b = 100 where id = 5';
+PREPARE ins from 'insert into t1 values (11,11)';
+PREPARE del from 'delete from t1 where id = 4';
+PREPARE rep from 'replace into t1 values (12,12),(6,600)';
+
+EXECUTE upd;
+EXECUTE ins;
+EXECUTE del;
+EXECUTE rep;
+
+SELECT * FROM t1 ORDER BY id;
+
+--connection node_2
+SELECT * FROM t1 ORDER BY id;
+
+--connection node_1
+DROP TABLE t1;
+
+#
+# Test procedure
+#
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=Aria;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+
+DELIMITER |;
+CREATE PROCEDURE proc()
+BEGIN
+ UPDATE t1 set b = 100 WHERE id = 5;
+ INSERT INTO t1 VALUES (11,11);
+ DELETE FROM t1 WHERE id = 4;
+ REPLACE INTO t1 VALUES (12,12),(6,600);
+ COMMIT;
+END|
+DELIMITER ;|
+
+CALL proc();
+SELECT * FROM t1 ORDER BY id;
+
+--connection node_2
+SELECT * FROM t1 ORDER BY id;
+
+--connection node_1
+DROP PROCEDURE proc;
+DROP TABLE t1;
+
+#
+# Test trigger
+#
+--connection node_1
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=Aria;
+CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT) ENGINE=Aria;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, NEW.b);
+CREATE TRIGGER tr2 BEFORE UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b),(NULL, NEW.b);
+CREATE TRIGGER tr3 BEFORE DELETE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b);
+
+INSERT INTO t1 VALUES (11,11);
+UPDATE t1 SET b = 200 WHERE id = 2;
+DELETE FROM t1 where id = 5;
+SELECT * FROM t1 ORDER BY id;
+SELECT * FROM t2 ORDER BY id;
+
+--connection node_2
+SELECT * FROM t1 ORDER BY id;
+SELECT * FROM t2 ORDER BY id;
+
+--connection node_1
+DROP TRIGGER tr1;
+DROP TRIGGER tr2;
+DROP TRIGGER tr3;
+DROP TABLE t1,t2;
+
+--disable_query_log
+--connection node_1
+SET GLOBAL wsrep_mode = DEFAULT;
+--connection node_2
+SET GLOBAL wsrep_mode = DEFAULT;
+--enable_query_log
+
diff --git a/mysql-test/suite/galera/t/galera_var_replicate_myisam_off.test b/mysql-test/suite/galera/t/galera_var_replicate_myisam_off.test
index a9811283918..a556547d990 100644
--- a/mysql-test/suite/galera/t/galera_var_replicate_myisam_off.test
+++ b/mysql-test/suite/galera/t/galera_var_replicate_myisam_off.test
@@ -1,21 +1,15 @@
#
-# Simple test for wsrep-replicate-myisam = FALSE
+# Simple test for wsrep_mode != REPLICATE_MYISAM
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
---let $wsrep_replicate_myisam_orig = `SELECT @@wsrep_replicate_myisam`
-
-SET GLOBAL wsrep_replicate_myisam = FALSE;
-
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=MyISAM;
INSERT INTO t1 VALUES (1);
--connection node_2
-SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
--connection node_1
---eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig
-
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test b/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test
index adb5cb04273..f405ebfdc46 100644
--- a/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test
+++ b/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test
@@ -1,17 +1,14 @@
#
-# Simple test for wsrep-replicate-myisam = ON
+# Simple test for wsrep-mode = REPLICATE_MYISAM
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
---let $wsrep_replicate_myisam_orig = `SELECT @@wsrep_replicate_myisam`
-
---connection node_1
-SET GLOBAL wsrep_replicate_myisam = TRUE;
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
--connection node_2
-SET GLOBAL wsrep_replicate_myisam = TRUE;
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
#
# Simple INSERT
@@ -24,7 +21,7 @@ INSERT INTO t1 VALUES (2), (3);
INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
--connection node_2
-SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
DROP TABLE t1;
@@ -39,10 +36,10 @@ REPLACE INTO t1 VALUES (1, 'klm'), (2,'xyz');
REPLACE INTO t1 SELECT 3, 'yyy' FROM DUAL;
--connection node_2
-SELECT COUNT(*) = 3 FROM t1;
-SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1 AND f2 = 'klm';
-SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2 AND f2 = 'xyz';
-SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3 AND f2 = 'yyy';
+SELECT COUNT(*) AS EXPECT_3 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 1 AND f2 = 'klm';
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 2 AND f2 = 'xyz';
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f1 = 3 AND f2 = 'yyy';
#
# UPDATE
@@ -52,7 +49,7 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3 AND f2 = 'yyy';
UPDATE t1 SET f2 = 'zzz' WHERE f2 = 'yyy';
--connection node_2
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'zzz';
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'zzz';
#
# DELETE
@@ -62,7 +59,7 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'zzz';
DELETE FROM t1 WHERE f2 = 'zzz';
--connection node_2
-SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'zzz';
+SELECT COUNT(*) AS EXPECT_0 FROM t1 WHERE f2 = 'zzz';
#
# TRUNCATE
@@ -72,7 +69,7 @@ SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'zzz';
TRUNCATE TABLE t1;
--connection node_2
-SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
DROP TABLE t1;
#
@@ -89,8 +86,8 @@ INSERT INTO t2 VALUES (1);
COMMIT;
--connection node_2
-SELECT COUNT(*) = 1 FROM t1;
-SELECT COUNT(*) = 1 FROM t2;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
#
# Transaction rollback
@@ -103,8 +100,8 @@ INSERT INTO t2 VALUES (2);
ROLLBACK;
--connection node_2
-SELECT COUNT(*) = 2 FROM t1;
-SELECT COUNT(*) = 1 FROM t2;
+SELECT COUNT(*) AS EXPECT_2 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
DROP TABLE t1;
DROP TABLE t2;
@@ -128,20 +125,7 @@ INSERT INTO t1 VALUES (1);
--connection node_1
COMMIT;
-
-DROP TABLE t1;
-DROP TABLE t2;
-
---echo #
---echo # MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
---echo #
---connection node_1
-CREATE TABLE t1 (i INT) ENGINE=INNODB;
-INSERT INTO t1 VALUES(1);
-# This command should not get replicated.
-SELECT * FROM t1;
-DROP TABLE t1;
-
+DROP TABLE t1, t2;
#
# Test prepared staments
#
@@ -218,12 +202,19 @@ DROP TRIGGER tr2;
DROP TRIGGER tr3;
DROP TABLE t1,t2;
+--echo #
+--echo # MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
+--echo #
--connection node_1
---disable_query_log
---eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig
---enable_query_log
+CREATE TABLE t1 (i INT) ENGINE=INNODB;
+INSERT INTO t1 VALUES(1);
+# This command should not get replicated.
+SELECT * FROM t1;
+DROP TABLE t1;
---connection node_2
+--connection node_1
--disable_query_log
---eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig
+SET GLOBAL wsrep_mode = DEFAULT;
+--connection node_2
+SET GLOBAL wsrep_mode = DEFAULT;
--enable_query_log
diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test
index ca75d33b7d7..0a32a06580b 100644
--- a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test
+++ b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test
@@ -93,4 +93,8 @@ CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with
DROP TABLE t2;
+--let $node_3=node_3
+--let $auto_increment_offset_node_3 = 3;
+--let $node_4=node_4
+--let $auto_increment_offset_node_4 = 4;
--source include/auto_increment_offset_restore.inc