diff --git a/server/core/gateway.cc b/server/core/gateway.cc index 345523f52..376574619 100644 --- a/server/core/gateway.cc +++ b/server/core/gateway.cc @@ -3305,7 +3305,7 @@ static bool handle_debug_args(char* args) size_t total_len = 1; for (int i = 0; debug_arguments[i].action != NULL; i++) { - total_len += strlen(debug_arguments[i].name) + 1; + total_len += strlen(debug_arguments[i].name) + 2; } char arglist[total_len]; arglist[0] = '\0'; diff --git a/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc b/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc index 92cd1048b..f563e9b83 100644 --- a/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc +++ b/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc @@ -68,8 +68,8 @@ struct AddressInfo }; static AddressInfo get_ip_string_and_port(const sockaddr_storage* sa); static bool gw_connection_established(DCB* dcb); -static bool gw_auth_is_complete(DCB* dcb); -json_t* gw_json_diagnostics(DCB* dcb); +static bool gw_auth_is_complete(DCB* dcb); +json_t* gw_json_diagnostics(DCB* dcb); extern "C" { @@ -604,16 +604,20 @@ static std::string get_detailed_error(DCB* dcb) { std::ostringstream ss; + ss << " (" << dcb->server->name(); + if (int err = gw_getsockerrno(dcb->fd)) { - ss << " (" << err << ", " << mxs_strerror(err) << ")"; + ss << ": " << err << ", " << mxs_strerror(err); } else if (dcb->is_fake_event) { // Fake events should not have TCP socket errors - ss << " (Generated event)"; + ss << ": Generated event"; } + ss << ")"; + return ss.str(); } diff --git a/system-test/backend_auth_fail.cpp b/system-test/backend_auth_fail.cpp index 4923e819d..00d85c64a 100644 --- a/system-test/backend_auth_fail.cpp +++ b/system-test/backend_auth_fail.cpp @@ -11,7 +11,7 @@ int main(int argc, char** argv) MYSQL* mysql[1000]; TestConnections* Test = new TestConnections(argc, argv); - Test->repl->execute_query_all_nodes((char*) "set global max_connections = 10;"); + Test->repl->execute_query_all_nodes((char*) "set global max_connections = 30;"); for (int x = 0; x < 3; x++) { @@ -31,10 +31,6 @@ int main(int argc, char** argv) } } - // Wait for the connections to clean up - Test->stop_timeout(); - sleep(2 * Test->repl->N); - Test->check_maxscale_alive(0); int rval = Test->global_result; delete Test; diff --git a/system-test/cache_basic.sh b/system-test/cache_basic.sh index 97e522cdb..e5d67910c 100755 --- a/system-test/cache_basic.sh +++ b/system-test/cache_basic.sh @@ -18,7 +18,8 @@ function run_test echo $test_name logdir=log_$test_name mkdir -p $logdir - mysqltest --host=${maxscale_000_network} --port=$port \ + mysqltest --no-defaults \ + --host=${maxscale_000_network} --port=$port \ --user=$user --password=$password \ --logdir=$logdir \ --test-file=$dir/t/$test_name.test \ diff --git a/system-test/cnf/maxscale.cnf.template.mxs421_events b/system-test/cnf/maxscale.cnf.template.mxs421_events index 2836b13bb..7376c0327 100644 --- a/system-test/cnf/maxscale.cnf.template.mxs421_events +++ b/system-test/cnf/maxscale.cnf.template.mxs421_events @@ -4,6 +4,8 @@ threads=###threads### #event.authentication_failure.facility=LOG_AUTH #event.authentication_failure.level=LOG_ERR +syslog=true + [MySQL-Monitor] type=monitor module=mysqlmon @@ -21,7 +23,7 @@ password=skysql [RW-Split-Listener] type=listener -service=RW Split Router +service=RW-Split-Router protocol=MySQLClient port=4006 diff --git a/system-test/masking_user.sh b/system-test/masking_user.sh index b21d7b59f..4f8dc8b39 100755 --- a/system-test/masking_user.sh +++ b/system-test/masking_user.sh @@ -34,7 +34,8 @@ dir="$src_dir/masking/$1" user=skysql test_name=masking_user -mysqltest --host=${maxscale_000_network} --port=$port \ +mysqltest --no-defaults \ + --host=${maxscale_000_network} --port=$port \ --user=$user --password=$maxscale_password \ --logdir=$logdir \ --test-file=$dir/t/$test_name.test \ @@ -50,7 +51,8 @@ fi user=maxskysql test_name=masking_user -mysqltest --host=${maxscale_000_network} --port=$port \ +mysqltest --no-defaults \ + --host=${maxscale_000_network} --port=$port \ --user=$user --password=$maxscale_password \ --logdir=$logdir \ --test-file=$dir/t/$test_name.test \ diff --git a/system-test/maxtest/src/mariadb_func.cc b/system-test/maxtest/src/mariadb_func.cc index a899fcca3..1a4ed9cc7 100644 --- a/system-test/maxtest/src/mariadb_func.cc +++ b/system-test/maxtest/src/mariadb_func.cc @@ -50,6 +50,9 @@ MYSQL* open_conn_db_flags(int port, set_ssl(conn); } + unsigned int timeout = 15; + mysql_options(conn, MYSQL_OPT_CONNECT_TIMEOUT, &timeout); + // MXS-2568: This fixes mxs1828_double_local_infile mysql_optionsv(conn, MYSQL_OPT_LOCAL_INFILE, (void*)"1"); diff --git a/system-test/mysqltest_driver.sh b/system-test/mysqltest_driver.sh index aea4cf0ac..f8fb48db7 100755 --- a/system-test/mysqltest_driver.sh +++ b/system-test/mysqltest_driver.sh @@ -47,7 +47,8 @@ for t in `ls $2/t/*.test|xargs -L 1 basename` do printf "$t:" test_name=${t%%.test} - mysqltest --host=${maxscale_000_network} --port=$port \ + mysqltest --no-defaults \ + --host=${maxscale_000_network} --port=$port \ --user=$user --password=$password \ --logdir=log_$1 \ --test-file=$2/t/$test_name.test \