summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2007-01-16 17:47:41 +0100
committerunknown <msvensson@neptunus.(none)>2007-01-16 17:47:41 +0100
commitadff49d95cc7909448bd702ebc020cacf22acf89 (patch)
treed6cb033ef6585cf2f39dd600df9837752197ab2d /client
parent7b965030418e9460c9f0324cdea0f0decd9686ee (diff)
downloadmariadb-git-adff49d95cc7909448bd702ebc020cacf22acf89.tar.gz
Don't reuse prepared statements if running with reconnect enabled
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index b163b5887e4..266c21d7880 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -5061,6 +5061,14 @@ end:
dynstr_free(&ds_execute_warnings);
}
+
+ /* Close the statement if - no reconnect, need new prepare */
+ if (mysql->reconnect)
+ {
+ mysql_stmt_close(stmt);
+ cur_con->stmt= NULL;
+ }
+
/*
We save the return code (mysql_stmt_errno(stmt)) from the last call sent
to the server into the mysqltest builtin variable $mysql_errno. This
@@ -5864,6 +5872,8 @@ int main(int argc, char **argv)
break;
case Q_ENABLE_RECONNECT:
set_reconnect(&cur_con->mysql, 1);
+ /* Close any open statements - no reconnect, need new prepare */
+ close_statements();
break;
case Q_DISABLE_PARSING:
if (parsing_disabled == 0)