summaryrefslogtreecommitdiff
path: root/tests/mysql_client_fw.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mysql_client_fw.c')
-rw-r--r--tests/mysql_client_fw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c
index b7211989f1f..50ecf6c0860 100644
--- a/tests/mysql_client_fw.c
+++ b/tests/mysql_client_fw.c
@@ -21,6 +21,7 @@
#include <my_getopt.h>
#include <m_string.h>
#include <mysqld_error.h>
+#include <mysql_version.h>
#include <sql_common.h>
#include <mysql/client_plugin.h>
@@ -363,7 +364,7 @@ static MYSQL* client_connect(ulong flag, uint protocol, my_bool auto_reconnect)
fprintf(stdout, "\n Check the connection options using --help or -?\n");
exit(1);
}
- mysql->reconnect= auto_reconnect;
+ mysql_options(mysql, MYSQL_OPT_RECONNECT, &auto_reconnect);
if (!opt_silent)
fprintf(stdout, "OK");
@@ -1145,7 +1146,7 @@ static my_bool thread_query(const char *query)
{
MYSQL *l_mysql;
my_bool error;
-
+ my_bool reconnect= 1;
error= 0;
if (!opt_silent)
fprintf(stdout, "\n in thread_query(%s)", query);
@@ -1162,7 +1163,7 @@ static my_bool thread_query(const char *query)
error= 1;
goto end;
}
- l_mysql->reconnect= 1;
+ mysql_options(l_mysql, MYSQL_OPT_RECONNECT, &reconnect);
if (mysql_query(l_mysql, query))
{
fprintf(stderr, "Query failed (%s)\n", mysql_error(l_mysql));