Merge branch '2.2' into 2.3

This commit is contained in:
Markus Mäkelä
2018-10-31 08:53:50 +02:00
12 changed files with 73 additions and 167 deletions

View File

@ -825,9 +825,6 @@ add_test_executable(compound_statement.cpp compound_statement replication LABELS
# Check if 'weightby' parameter works
add_test_executable(server_weight.cpp server_weight galera.weight LABELS readwritesplit readconnroute LIGHT GALERA_BACKEND)
# Executes a lot of session commands with "disable_sescmd_history=true" and check that memory consumption is not increasing
add_test_executable(ses_bigmem.cpp ses_bigmem no_ses_cmd_store LABELS readwritesplit REPL_BACKEND)
# test for 'max_sescmd_history' and 'connection_timeout' parameters
add_test_executable(session_limits.cpp session_limits session_limits LABELS readwritesplit REPL_BACKEND)

View File

@ -1,5 +1,7 @@
[maxscale]
threads=###threads###
query_retries=2
query_retry_timeout=10
[MySQL-Monitor]
type=monitor

View File

@ -1,92 +0,0 @@
[maxscale]
threads=###threads###
log_warning=1
[MySQL Monitor]
type=monitor
module=mysqlmon
servers= server1, server2,server3 ,server4
user=maxskysql
password= skysql
monitor_interval=1000
[RW Split Router]
type=service
router= readwritesplit
servers=server1, server2, server3,server4
user=maxskysql
password=skysql
slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS
disable_sescmd_history=true
max_slave_connections=1
[Read Connection Router Slave]
type=service
router=readconnroute
router_options= slave
servers=server1,server2,server3,server4
user=maxskysql
password=skysql
[Read Connection Router Master]
type=service
router=readconnroute
router_options=master
servers=server1,server2,server3,server4
user=maxskysql
password=skysql
[RW Split Listener]
type=listener
service=RW Split Router
protocol=MySQLClient
port=4006
#socket=/tmp/rwsplit.sock
[Read Connection Listener Slave]
type=listener
service=Read Connection Router Slave
protocol=MySQLClient
port=4009
[Read Connection Listener Master]
type=listener
service=Read Connection Router Master
protocol=MySQLClient
port=4008
[CLI]
type=service
router=cli
[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
#address=localhost
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

@ -46,6 +46,7 @@ int main(int argc, char** argv)
test.tprintf("Syncing slaves");
test.stop_timeout();
test.repl->fix_replication();
test.repl->sync_slaves();
test.set_timeout(60);

View File

@ -16,7 +16,7 @@ int main(int argc, char* argv[])
/** Create a database on each node */
for (int i = 0; i < test.repl->N; i++)
{
test.set_timeout(20);
test.set_timeout(60);
execute_query(test.repl->nodes[i], "set global max_connections = 600");
execute_query(test.repl->nodes[i], "DROP DATABASE IF EXISTS shard_db%d", i);
execute_query(test.repl->nodes[i], "CREATE DATABASE shard_db%d", i);
@ -31,23 +31,23 @@ int main(int argc, char* argv[])
{
char str[256];
sprintf(str, "shard_db%d", i);
test.set_timeout(30);
test.set_timeout(60);
MYSQL* conn = open_conn_db(test.maxscales->rwsplit_port[0],
test.maxscales->IP[0],
str,
test.maxscales->user_name,
test.maxscales->password,
test.ssl);
test.set_timeout(30);
test.set_timeout(60);
test.add_result(execute_query(conn, "SELECT 1"), "Trying DB %d failed at %d", i, j);
mysql_close(conn);
}
}
/** Create a database on each node */
/** Drop the databases */
for (int i = 0; i < test.repl->N; i++)
{
test.set_timeout(20);
test.set_timeout(60);
execute_query(test.repl->nodes[i], "DROP DATABASE shard_db%d", i);
test.stop_timeout();
}

View File

@ -1,53 +0,0 @@
/**
* @file ses_bigmem Executes a lot of session commands with "disable_sescmd_history=true" and check that
* memory consumption is not increasing
* (relates to MXS-672 "maxscale possible memory leak"
*/
#include <iostream>
#include <unistd.h>
#include "testconnections.h"
using namespace std;
int main(int argc, char* argv[])
{
TestConnections* Test = new TestConnections(argc, argv);
unsigned long maxscale_mem;
Test->set_timeout(10);
Test->maxscales->connect_maxscale(0);
int iterations = Test->smoke ? 100000 : 1000000;
int r = Test->smoke ? 1 : 3;
for (int j = 0; j < r; j++)
{
for (int i = 0; i < iterations && Test->global_result == 0; i++)
{
Test->set_timeout(10);
Test->try_query(Test->maxscales->routers[0][j], (char*) "set autocommit=0;");
Test->try_query(Test->maxscales->routers[0][j], (char*) "select 1;");
Test->try_query(Test->maxscales->routers[0][j], (char*) "set autocommit=1;");
Test->try_query(Test->maxscales->routers[0][j], (char*) "select 2;");
if ((i / 1000) * 1000 == i)
{
Test->tprintf("i=%d\n", i);
}
}
maxscale_mem = Test->maxscales->get_maxscale_memsize(0);
Test->tprintf("Maxscale process uses %lu KBytes\n", maxscale_mem);
if (maxscale_mem > 2000000)
{
Test->add_result(1, "Maxscale consumes too much memory\n");
}
}
Test->check_maxscale_alive(0);
int rval = Test->global_result;
delete Test;
return rval;
}