Merge branch '2.3' into 2.4

This commit is contained in:
Esa Korhonen
2020-07-28 16:00:02 +03:00
943 changed files with 12 additions and 11 deletions

46
system-test/mxs314.cpp Normal file
View File

@ -0,0 +1,46 @@
/**
* @file mx314.cpp regression case for bug MXS-314 ("Read Write Split Error with Galera Nodes")
* - try prepared stmt 'SELECT 1,1,1,1...." with different number of '1'
* - check if Maxscale alive
*/
#include <maxtest/testconnections.hh>
using namespace std;
int main(int argc, char** argv)
{
TestConnections::require_galera(true);
TestConnections test(argc, argv);
string query = "select 1";
for (int i = 0; i < 300; i++)
{
query += ",1";
}
test.maxscales->connect();
MYSQL_STMT* stmt = mysql_stmt_init(test.maxscales->conn_rwsplit[0]);
for (int i = 300; i < 500; i++)
{
test.set_timeout(30);
test.add_result(mysql_stmt_prepare(stmt, query.c_str(), query.length()),
"Failed at %d: %s\n",
i,
mysql_error(test.maxscales->conn_rwsplit[0]));
test.add_result(mysql_stmt_reset(stmt),
"Failed at %d: %s\n",
i,
mysql_error(test.maxscales->conn_rwsplit[0]));
query += ",1";
}
test.set_timeout(20);
mysql_stmt_close(stmt);
test.maxscales->disconnect();
return test.global_result;
}