summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 12016d9b6c7..b9aac043017 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -949,6 +949,8 @@ pthread_handler_t connection_thread(void *arg)
end_thread:
cn->query_done= 1;
+ mysql_close(cn->mysql);
+ cn->mysql= 0;
mysql_thread_end();
pthread_exit(0);
return 0;
@@ -1462,7 +1464,7 @@ void close_statements()
for (con= connections; con < next_con; con++)
{
if (con->stmt)
- mysql_stmt_close(con->stmt);
+ do_stmt_close(con);
con->stmt= 0;
}
DBUG_VOID_RETURN;
@@ -2209,8 +2211,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
DBUG_ENTER("dyn_string_cmp");
DBUG_PRINT("enter", ("fname: %s", fname));
- if ((fd= create_temp_file(temp_file_path, TMPDIR,
- "tmp", O_CREAT | O_SHARE | O_RDWR,
+ if ((fd= create_temp_file(temp_file_path, TMPDIR, "tmp", O_SHARE,
MYF(MY_WME))) < 0)
die("Failed to create temporary file for ds");
@@ -4684,8 +4685,7 @@ void do_perl(struct st_command *command)
/* Create temporary file name */
if ((fd= create_temp_file(temp_file_path, getenv("MYSQLTEST_VARDIR"),
- "tmp", O_CREAT | O_SHARE | O_RDWR,
- MYF(MY_WME))) < 0)
+ "tmp", O_SHARE, MYF(MY_WME))) < 0)
die("Failed to create temporary file for perl command");
my_close(fd, MYF(0));