connection node_2;
connection node_1;
#
# Case 1: test with binlog_format ROW
#
connection node_1;
SET @@binlog_format=ROW;
CREATE TABLE t1 (a INT UNIQUE) SELECT 1 AS a,2 AS b UNION SELECT 2 AS a,3 AS c;
CREATE TABLE t2 (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c;
SELECT * FROM t1;
a	b
1	2
2	3
SELECT * FROM t2;
a	b
1	3
connection node_2;
SELECT * FROM t1;
a	b
1	2
2	3
SELECT * FROM t2;
a	b
1	3
DROP TABLE t1,t2;
#
# Case 2: test with binlog_format MIXED
#
connection node_1;
SET @@binlog_format=MIXED;
Warnings:
Warning	1105	MariaDB Galera and flashback do not support binlog format: MIXED
CREATE TABLE t1 (a INT UNIQUE) SELECT 1 AS a,2 AS b UNION SELECT 2 AS a,3 AS c;
Warnings:
Warning	1105	Galera does not support binlog_format = MIXED in CREATE TABLE [SELECT|REPLACE] forcing ROW
Warning	1105	Galera does not support binlog_format = MIXED in CREATE TABLE [SELECT|REPLACE] forcing ROW
CREATE TABLE t2 (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c;
Warnings:
Warning	1105	Galera does not support binlog_format = MIXED in CREATE TABLE [SELECT|REPLACE] forcing ROW
Warning	1105	Galera does not support binlog_format = MIXED in CREATE TABLE [SELECT|REPLACE] forcing ROW
SELECT * FROM t1;
a	b
1	2
2	3
SELECT * FROM t2;
a	b
1	3
connection node_2;
SELECT * FROM t1;
a	b
1	2
2	3
SELECT * FROM t2;
a	b
1	3
DROP TABLE t1,t2;
#
# Case 3: test with binlog_format STATEMENT
#
connection node_1;
SET @@binlog_format=STATEMENT;
Warnings:
Warning	1105	MariaDB Galera and flashback do not support binlog format: STATEMENT
CREATE TABLE t1 (a INT UNIQUE) SELECT 1 AS a,2 AS b UNION SELECT 2 AS a,3 AS c;
Warnings:
Warning	1105	Galera does not support binlog_format = MIXED in CREATE TABLE [SELECT|REPLACE] forcing ROW
Warning	1105	Galera does not support binlog_format = MIXED in CREATE TABLE [SELECT|REPLACE] forcing ROW
CREATE TABLE t2 (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c;
Warnings:
Warning	1105	Galera does not support binlog_format = MIXED in CREATE TABLE [SELECT|REPLACE] forcing ROW
Warning	1105	Galera does not support binlog_format = MIXED in CREATE TABLE [SELECT|REPLACE] forcing ROW
SELECT * FROM t1;
a	b
1	2
2	3
SELECT * FROM t2;
a	b
1	3
connection node_2;
SELECT * FROM t1;
a	b
1	2
2	3
SELECT * FROM t2;
a	b
1	3
DROP TABLE t1,t2;
connection node_1;
