MXS-1653: Add test case
Added test case that reproduces the problem.
This commit is contained in:
@ -601,6 +601,10 @@ add_test_executable(mxs1585.cpp mxs1585 mxs1585 LABELS REPL_BACKEND)
|
||||
# https://jira.mariadb.org/browse/MXS-1643
|
||||
add_test_executable(mxs1643_extra_events.cpp mxs1643_extra_events mxs1643_extra_events LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-1653: sysbench failed to initialize w/ MaxScale read/write splitter
|
||||
# https://jira.mariadb.org/browse/MXS-1653
|
||||
add_test_executable(mxs1653_ps_hang.cpp mxs1653_ps_hang replication LABELS REPL_BACKEND)
|
||||
|
||||
# 'namedserverfilter' test
|
||||
add_test_executable(namedserverfilter.cpp namedserverfilter namedserverfilter LABELS namedserverfilter LIGHT REPL_BACKEND)
|
||||
|
||||
|
||||
29
maxscale-system-test/mxs1653_ps_hang.cpp
Normal file
29
maxscale-system-test/mxs1653_ps_hang.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "testconnections.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
TestConnections test(argc, argv);
|
||||
|
||||
test.set_timeout(20);
|
||||
test.maxscales->connect();
|
||||
|
||||
MYSQL_STMT* stmt = mysql_stmt_init(test.maxscales->conn_rwsplit[0]);
|
||||
std::string query = "COMMIT";
|
||||
mysql_stmt_prepare(stmt, query.c_str(), query.size());
|
||||
mysql_stmt_execute(stmt);
|
||||
mysql_stmt_close(stmt);
|
||||
|
||||
stmt = mysql_stmt_init(test.maxscales->conn_rwsplit[0]);
|
||||
query = "BEGIN";
|
||||
mysql_stmt_prepare(stmt, query.c_str(), query.size());
|
||||
mysql_stmt_execute(stmt);
|
||||
mysql_stmt_close(stmt);
|
||||
|
||||
test.set_timeout(30);
|
||||
execute_query_silent(test.maxscales->conn_rwsplit[0], "PREPARE test FROM 'BEGIN'");
|
||||
execute_query_silent(test.maxscales->conn_rwsplit[0], "EXECUTE test");
|
||||
|
||||
test.maxscales->disconnect();
|
||||
|
||||
return test.global_result;
|
||||
}
|
||||
Reference in New Issue
Block a user