summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2007-01-16 14:13:48 +0100
committerunknown <msvensson@neptunus.(none)>2007-01-16 14:13:48 +0100
commitc5a168cfdfe9d7f570d4af7ffdae3d60aed0b4a7 (patch)
treedd2b0d3ae60fc3e0f6750e37a30682b4cb655dd9 /client
parenta05e73548812b82b0cee078c8008ba1826e2e18b (diff)
parent7b965030418e9460c9f0324cdea0f0decd9686ee (diff)
downloadmariadb-git-c5a168cfdfe9d7f570d4af7ffdae3d60aed0b4a7.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/bug15518/my50-bug15518
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint client/mysqltest.c: Auto merged libmysql/libmysql.c: Auto merged tests/mysql_client_test.c: SCCS merged
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 820606f9e3e..62adf6e1dbb 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -724,6 +724,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");
@@ -2907,6 +2921,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);
@@ -5112,10 +5130,7 @@ end:
*/
var_set_errno(mysql_stmt_errno(stmt));
-#ifndef BUG15518_FIXED
- mysql_stmt_close(stmt);
- cur_con->stmt= NULL;
-#endif
+
DBUG_VOID_RETURN;
}
@@ -5902,6 +5917,8 @@ int main(int argc, char **argv)
break;
case Q_DISABLE_PS_PROTOCOL:
ps_protocol_enabled= 0;
+ /* Close any open statements */
+ close_statements();
break;
case Q_ENABLE_PS_PROTOCOL:
ps_protocol_enabled= ps_protocol;