From 92db4a838f9198ab0924b8b876b5991bfe00e8d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Mar 2005 09:59:41 -0800 Subject: Fix reconnect when using prepared statements, and add --disable_reconnect and --enable_reconnect to mysqltest so that it can be tested properly. (Bug #8866) client/mysqltest.c: Add support for --disable_reconnect and --enable_reconnect mysql-test/r/kill.result: Update results mysql-test/t/kill.test: Fix test to actually verify that killing a connection is working, and that automatic reconnect is working as desired. sql-common/client.c: Clean up MYSQL->stmts on reconnect by invalidating statements not in the MYSQL_STMT_INIT_DONE state, and reconnecting others to the new MYSQL object. --- client/mysqltest.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'client') diff --git a/client/mysqltest.c b/client/mysqltest.c index 042f84dfb9e..1c102bc1073 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -280,6 +280,7 @@ Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS, Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, Q_START_TIMER, Q_END_TIMER, Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, +Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ @@ -365,6 +366,8 @@ const char *command_names[]= "character_set", "disable_ps_protocol", "enable_ps_protocol", + "disable_reconnect", + "enable_reconnect", 0 }; @@ -3624,6 +3627,12 @@ int main(int argc, char **argv) case Q_ENABLE_PS_PROTOCOL: ps_protocol_enabled= ps_protocol; break; + case Q_DISABLE_RECONNECT: + cur_con->mysql.reconnect= 0; + break; + case Q_ENABLE_RECONNECT: + cur_con->mysql.reconnect= 1; + break; default: processed = 0; break; } -- cgit v1.2.1