diff options
-rw-r--r-- | client/mysqltest.c | 25 | ||||
-rw-r--r-- | mysql-test/lib/mtr_misc.pl | 1 |
2 files changed, 24 insertions, 2 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 8de3022c4fe..7193eca36bd 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -725,6 +725,20 @@ void close_connections() } +void close_statements() +{ + struct st_connection *con; + DBUG_ENTER("close_statements"); + for (con= connections; con < next_con; con++) + { + if (con->stmt) + mysql_stmt_close(con->stmt); + con->stmt= 0; + } + DBUG_VOID_RETURN; +} + + void close_files() { DBUG_ENTER("close_files"); @@ -2901,6 +2915,10 @@ void do_close_connection(struct st_command *command) } } #endif + if (next_con->stmt) + mysql_stmt_close(next_con->stmt); + next_con->stmt= 0; + mysql_close(&con->mysql); if (con->util_mysql) mysql_close(con->util_mysql); @@ -2962,10 +2980,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host, Connect failed Only allow retry if this was an error indicating the server - could not be contacted + could not be contacted. Error code differs depending + on protocol/connection type */ - if (mysql_errno(mysql) == CR_CONNECTION_ERROR && + if ((mysql_errno(mysql) == CR_CONN_HOST_ERROR || + mysql_errno(mysql) == CR_CONNECTION_ERROR) && failed_attempts < opt_max_connect_retries) my_sleep(connection_retry_sleep); else @@ -5892,6 +5912,7 @@ int main(int argc, char **argv) break; case Q_DISABLE_PS_PROTOCOL: ps_protocol_enabled= 0; + close_statements(); break; case Q_ENABLE_PS_PROTOCOL: ps_protocol_enabled= ps_protocol; diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl index 846ca25b725..f28e25e5966 100644 --- a/mysql-test/lib/mtr_misc.pl +++ b/mysql-test/lib/mtr_misc.pl @@ -134,6 +134,7 @@ sub mtr_exe_maybe_exists (@) { my @path= @_; map {$_.= ".exe"} @path if $::glob_win32; + map {$_.= ".nlm"} @path if $::glob_netware; foreach my $path ( @path ) { if($::glob_win32) |