summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-12-04 19:16:55 +0100
committerunknown <msvensson@neptunus.(none)>2006-12-04 19:16:55 +0100
commit9f1fa169c59c29fa1d9c877efd14ffac5ba87448 (patch)
tree79c1e58dd314868b7a50927d16fbe5b8d1319b60 /client
parent7200e2e7435cee3bde73939554150974bfe086f5 (diff)
downloadmariadb-git-9f1fa169c59c29fa1d9c877efd14ffac5ba87448.tar.gz
mysqltest
Close any statements that might be open before program exit Close any statments that might be open when calling "disable_ps_protocol" client/mysqltest.c: Close any statements that might be open before program exit Close any statments that might be open when calling "disable_ps_protocol"
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 2f0a2bc6168..f103e793d52 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -722,6 +722,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");
@@ -2898,6 +2912,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);
@@ -5882,6 +5900,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;