summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-03-28 09:59:41 -0800
committerunknown <jimw@mysql.com>2005-03-28 09:59:41 -0800
commit92db4a838f9198ab0924b8b876b5991bfe00e8d9 (patch)
tree78e84e0886e0c93e92557c2a21167ac6e8d2ebd2 /client
parent3785d2188f557bc01be28e7f2480be42ca598ab9 (diff)
downloadmariadb-git-92db4a838f9198ab0924b8b876b5991bfe00e8d9.tar.gz
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.
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c9
1 files changed, 9 insertions, 0 deletions
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;
}