summaryrefslogtreecommitdiff
path: root/mysql-test/t/kill.test
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 /mysql-test/t/kill.test
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 'mysql-test/t/kill.test')
-rw-r--r--mysql-test/t/kill.test13
1 files changed, 8 insertions, 5 deletions
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 65d4f27059f..4afb60a7bdd 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -23,12 +23,15 @@ connection con2;
select ((@id := kill_id) - kill_id) from t1;
kill @id;
-# Wait for thread to do.
---sleep 5
-# verify that con1 is doning a reconnect
connection con1;
-ping
-ping
+
+--disable_reconnect
+# this statement should fail
+--error 2006
+select 1;
+--enable_reconnect
+# this should work, and we should have a new connection_id()
+select ((@id := kill_id) - kill_id) from t1;
select @id != connection_id();
#make sure the server is still alive