summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2011-09-30 15:25:19 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2011-09-30 15:25:19 +0200
commit0bc430286ee9cba9fcd98749981c04978bf95730 (patch)
tree0988c278ef2b364a541857ebae24f733dd3b8c0a /client/mysqltest.cc
parent2788e98ad310d48e430c0c4f1942f3e26924240e (diff)
downloadmariadb-git-0bc430286ee9cba9fcd98749981c04978bf95730.tar.gz
12956584 followup fix for mysqltest
run_query_stmt() might use disable_xxx vars after calling handle_no_error But handle_no_error() hes reverted any ONCE settings Fix is to take revert_properties() out of handle_no_error()
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 1661385162c..915c6e4d495 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5364,6 +5364,7 @@ do_handle_error:
var_set_errno(0);
handle_no_error(command);
+ revert_properties();
return 1; /* Connected */
}
@@ -7319,6 +7320,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
/* If we come here the query is both executed and read successfully */
handle_no_error(command);
+ revert_properties();
end:
@@ -7514,8 +7516,6 @@ void handle_no_error(struct st_command *command)
die("query '%s' succeeded - should have failed with sqlstate %s...",
command->query, command->expected_errors.err[0].code.sqlstate);
}
-
- revert_properties();
DBUG_VOID_RETURN;
}
@@ -7546,9 +7546,6 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
DBUG_ENTER("run_query_stmt");
DBUG_PRINT("query", ("'%-.60s'", query));
- /* Remember disable_result_log since handle_no_error() may reset it */
- my_bool dis_res= disable_result_log;
-
/*
Init a new stmt if it's not already one created for this connection
*/
@@ -7644,7 +7641,7 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
/* If we got here the statement was both executed and read successfully */
handle_no_error(command);
- if (!dis_res)
+ if (!disable_result_log)
{
/*
Not all statements creates a result set. If there is one we can
@@ -7720,7 +7717,7 @@ end:
dynstr_free(&ds_prepare_warnings);
dynstr_free(&ds_execute_warnings);
}
-
+ revert_properties();
/* Close the statement if - no reconnect, need new prepare */
if (mysql->reconnect)