mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-7205 : Galera cluster & sql_log_bin = off don't work
While sql_bin_log=1(0) is meant to control binary logging for the current session so that the updates to do(not) get logged into the binary log to be replicated to the async MariaDB slave. The same should not affect galera replication. That is, the updates should always get replicated to other galera nodes regardless of sql_bin_log's value. Fixed by making sure that the updates are written to binlog cache irrespective of sql_bin_log. Added test cases.
This commit is contained in:
52
mysql-test/suite/galera/r/sql_log_bin.result
Normal file
52
mysql-test/suite/galera/r/sql_log_bin.result
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
# On node_1
|
||||
USE test;
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
# Disable binary logging for current session
|
||||
SET SQL_LOG_BIN=OFF;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
CREATE TABLE t2(c1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
CREATE TABLE test.t3 AS SELECT * from t1;
|
||||
# Enable binary logging for current session
|
||||
SET SQL_LOG_BIN=ON;
|
||||
INSERT INTO t2 VALUES (2);
|
||||
CREATE TABLE t4 AS SELECT * from t2;
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
SELECT * FROM t2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
SELECT * FROM t3;
|
||||
c1
|
||||
1
|
||||
2
|
||||
SELECT * FROM t4;
|
||||
c1
|
||||
1
|
||||
2
|
||||
|
||||
# On node_2
|
||||
USE test;
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
SELECT * FROM t2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
SELECT * FROM t3;
|
||||
c1
|
||||
1
|
||||
2
|
||||
SELECT * FROM t4;
|
||||
c1
|
||||
1
|
||||
2
|
||||
DROP TABLE t1, t2, t3, t4;
|
||||
# End of test
|
Reference in New Issue
Block a user