MXS-1543: Add test case
Added test case that checks that statement based replication is detected.
This commit is contained in:
@ -522,6 +522,10 @@ add_test_executable(mxs1516.cpp mxs1516 replication LABELS REPL_BACKEND)
|
|||||||
# https://jira.mariadb.org/browse/MXS-1542
|
# https://jira.mariadb.org/browse/MXS-1542
|
||||||
add_test_executable(mxs1542.cpp mxs1542 avro LABELS REPL_BACKEND)
|
add_test_executable(mxs1542.cpp mxs1542 avro LABELS REPL_BACKEND)
|
||||||
|
|
||||||
|
# MXS-1543: Avrorouter doesn't detect MIXED or STATEMENT format replication
|
||||||
|
# https://jira.mariadb.org/browse/MXS-1543
|
||||||
|
add_test_executable(mxs1543.cpp mxs1543 avro LABELS REPL_BACKEND)
|
||||||
|
|
||||||
# MXS-1585: Crash in MaxScale 2.1.12
|
# MXS-1585: Crash in MaxScale 2.1.12
|
||||||
# https://jira.mariadb.org/browse/MXS-1585
|
# https://jira.mariadb.org/browse/MXS-1585
|
||||||
add_test_executable(mxs1585.cpp mxs1585 mxs1585 LABELS REPL_BACKEND)
|
add_test_executable(mxs1585.cpp mxs1585 mxs1585 LABELS REPL_BACKEND)
|
||||||
|
|||||||
32
maxscale-system-test/mxs1543.cpp
Normal file
32
maxscale-system-test/mxs1543.cpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* MXS-1543: https://jira.mariadb.org/browse/MXS-1543
|
||||||
|
*
|
||||||
|
* Avrorouter doesn't detect MIXED or STATEMENT format replication
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "testconnections.h"
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
TestConnections::skip_maxscale_start(true);
|
||||||
|
TestConnections::check_nodes(false);
|
||||||
|
TestConnections test(argc, argv);
|
||||||
|
|
||||||
|
test.replicate_from_master();
|
||||||
|
|
||||||
|
test.repl->connect();
|
||||||
|
execute_query(test.repl->nodes[0], "CREATE OR REPLACE TABLE t1 (data VARCHAR(30))");
|
||||||
|
execute_query(test.repl->nodes[0], "INSERT INTO t1 VALUES ('ROW')");
|
||||||
|
execute_query(test.repl->nodes[0], "SET binlog_format=STATEMENT");
|
||||||
|
execute_query(test.repl->nodes[0], "FLUSH LOGS");
|
||||||
|
execute_query(test.repl->nodes[0], "INSERT INTO t1 VALUES ('STATEMENT')");
|
||||||
|
execute_query(test.repl->nodes[0], "SET binlog_format=ROW");
|
||||||
|
execute_query(test.repl->nodes[0], "FLUSH LOGS");
|
||||||
|
execute_query(test.repl->nodes[0], "INSERT INTO t1 VALUES ('ROW2')");
|
||||||
|
|
||||||
|
// Wait for the avrorouter to process the data
|
||||||
|
sleep(10);
|
||||||
|
test.check_log_err("Possible STATEMENT or MIXED", true);
|
||||||
|
|
||||||
|
return test.global_result;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user