MXS-2631 Add system test

This commit is contained in:
Marko 2019-08-27 15:21:22 +03:00
parent 72ce2d2bc1
commit cc038278d6
3 changed files with 87 additions and 0 deletions

View File

@ -982,6 +982,9 @@ add_test_executable(mxs2609_history_replay.cpp mxs2609_history_replay mxs2609_hi
# MXS-2621: Incorrect SQL if lower_case_table_names is used.
add_test_executable(mxs2621_lower_case_tables.cpp mxs2621_lower_case_tables mxs2621_lower_case_tables LABELS REPL_BACKEND)
# MXS-2631: Duplicate system tables not ignored
add_test_executable(mxs2631_ignore_system_tables.cpp mxs2631_ignore_system_tables mxs2631_ignore_system_tables LABELS schemarouter BREAKS_REPL REPL_BACKEND)
############################################
# END: Normal tests #
############################################

View File

@ -0,0 +1,59 @@
[maxscale]
threads=###threads###
log_warning=1
[MySQL-Monitor]
type=monitor
module=mysqlmon
servers=server1,server2,server3,server4
user=maxskysql
password=skysql
[Sharding-router]
type=service
router=schemarouter
servers=server1,server2,server3,server4
user=maxskysql
password=skysql
auth_all_servers=1
ignore_databases_regex=^(?!(mysql|information_schema|performance_schema))
[Sharding-Listener]
type=listener
service=Sharding-router
protocol=MySQLClient
port=4006
[CLI]
type=service
router=cli
[CLI-Listener]
type=listener
service=CLI
protocol=maxscaled
socket=default
[server1]
type=server
address=###node_server_IP_1###
port=###node_server_port_1###
protocol=MySQLBackend
[server2]
type=server
address=###node_server_IP_2###
port=###node_server_port_2###
protocol=MySQLBackend
[server3]
type=server
address=###node_server_IP_3###
port=###node_server_port_3###
protocol=MySQLBackend
[server4]
type=server
address=###node_server_IP_4###
port=###node_server_port_4###
protocol=MySQLBackend

View File

@ -0,0 +1,25 @@
/**
* MXS-2631: Dublicate system tables found
*
* https://jira.mariadb.org/browse/MXS-2631
*/
#include <iostream>
#include "testconnections.h"
int main(int argc, char* argv[])
{
TestConnections test(argc, argv);
test.set_timeout(30);
MYSQL* conn = test.maxscales->open_rwsplit_connection(0);
test.add_result(execute_query(conn, "SELECT 1"), "Query should succeed.");
mysql_close(conn);
test.stop_timeout();
sleep(1);
test.repl->fix_replication();
return test.global_result;
}