Commit 33af5575 authored by Jan Lindström's avatar Jan Lindström Committed by Julius Goryavsky

MDEV-25731 : Assertion `mode_ == m_local' failed in void...

MDEV-25731 : Assertion `mode_ == m_local' failed in void wsrep::client_state::streaming_params(wsrep::streaming_context::fragment_unit, size_t)

Problem was that if wsrep_load_data_splitting was used
streaming replication (SR) parameters were set
for MyISAM table. Galera does not currently support SR for
MyISAM.

Fix is to ignore wsrep_load_data_splitting setting (with
warning) if table is not InnoDB table.

This is 10.6+ case of fix.
Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
parent 4aa92911
...@@ -4,9 +4,7 @@ connection node_1; ...@@ -4,9 +4,7 @@ connection node_1;
SET GLOBAL wsrep_load_data_splitting=ON; SET GLOBAL wsrep_load_data_splitting=ON;
Warnings: Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SET GLOBAL wsrep_replicate_myisam=ON; SET GLOBAL wsrep_mode=REPLICATE_MYISAM;
Warnings:
Warning 1287 '@@wsrep_replicate_myisam' is deprecated and will be removed in a future release. Please use '@@wsrep_mode=REPLICATE_MYISAM' instead
CREATE TABLE t1 (c1 int) ENGINE=MYISAM; CREATE TABLE t1 (c1 int) ENGINE=MYISAM;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n'; LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
Warnings: Warnings:
...@@ -19,8 +17,11 @@ SELECT COUNT(*) AS EXPECT_6 FROM t1; ...@@ -19,8 +17,11 @@ SELECT COUNT(*) AS EXPECT_6 FROM t1;
EXPECT_6 EXPECT_6
6 6
connection node_1; connection node_1;
ALTER TABLE t1 ENGINE=InnoDB; ALTER TABLE t1 ENGINE=Aria;
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n'; LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
Warnings:
Warning 1235 wsrep_load_data_splitting for other than InnoDB tables
SELECT COUNT(*) AS EXPECT_12 FROM t1; SELECT COUNT(*) AS EXPECT_12 FROM t1;
EXPECT_12 EXPECT_12
12 12
...@@ -29,10 +30,18 @@ SELECT COUNT(*) AS EXPECT_12 FROM t1; ...@@ -29,10 +30,18 @@ SELECT COUNT(*) AS EXPECT_12 FROM t1;
EXPECT_12 EXPECT_12
12 12
connection node_1; connection node_1;
ALTER TABLE t1 ENGINE=InnoDB;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
SELECT COUNT(*) AS EXPECT_18 FROM t1;
EXPECT_18
18
connection node_2;
SELECT COUNT(*) AS EXPECT_18 FROM t1;
EXPECT_18
18
connection node_1;
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL wsrep_load_data_splitting=OFF; SET GLOBAL wsrep_load_data_splitting=OFF;
Warnings: Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SET GLOBAL wsrep_replicate_myisam=OFF; SET GLOBAL wsrep_mode=DEFAULT;
Warnings:
Warning 1287 '@@wsrep_replicate_myisam' is deprecated and will be removed in a future release. Please use '@@wsrep_mode=REPLICATE_MYISAM' instead
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
--connection node_1 --connection node_1
SET GLOBAL wsrep_load_data_splitting=ON; SET GLOBAL wsrep_load_data_splitting=ON;
SET GLOBAL wsrep_replicate_myisam=ON; SET GLOBAL wsrep_mode=REPLICATE_MYISAM;
CREATE TABLE t1 (c1 int) ENGINE=MYISAM; CREATE TABLE t1 (c1 int) ENGINE=MYISAM;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n'; LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
SELECT COUNT(*) AS EXPECT_6 FROM t1; SELECT COUNT(*) AS EXPECT_6 FROM t1;
...@@ -12,7 +12,8 @@ SELECT COUNT(*) AS EXPECT_6 FROM t1; ...@@ -12,7 +12,8 @@ SELECT COUNT(*) AS EXPECT_6 FROM t1;
SELECT COUNT(*) AS EXPECT_6 FROM t1; SELECT COUNT(*) AS EXPECT_6 FROM t1;
--connection node_1 --connection node_1
ALTER TABLE t1 ENGINE=InnoDB; ALTER TABLE t1 ENGINE=Aria;
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n'; LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
SELECT COUNT(*) AS EXPECT_12 FROM t1; SELECT COUNT(*) AS EXPECT_12 FROM t1;
...@@ -20,8 +21,14 @@ SELECT COUNT(*) AS EXPECT_12 FROM t1; ...@@ -20,8 +21,14 @@ SELECT COUNT(*) AS EXPECT_12 FROM t1;
SELECT COUNT(*) AS EXPECT_12 FROM t1; SELECT COUNT(*) AS EXPECT_12 FROM t1;
--connection node_1 --connection node_1
DROP TABLE t1; ALTER TABLE t1 ENGINE=InnoDB;
SET GLOBAL wsrep_load_data_splitting=OFF; LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
SET GLOBAL wsrep_replicate_myisam=OFF; SELECT COUNT(*) AS EXPECT_18 FROM t1;
--connection node_2
SELECT COUNT(*) AS EXPECT_18 FROM t1;
--connection node_1
DROP TABLE t1;
SET GLOBAL wsrep_load_data_splitting=OFF;
SET GLOBAL wsrep_mode=DEFAULT;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment