summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2011-09-15 10:53:19 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2011-09-15 10:53:19 +0200
commit32e8085de932a60d933b6405cdbaf5982d6204c3 (patch)
tree7ccb7c5adaaad82e5b96e3f3297f1aa186cdf04c /client/mysqltest.cc
parent69e76a168b9311f79f4f5ab6b942bf6048a7241f (diff)
downloadmariadb-git-32e8085de932a60d933b6405cdbaf5982d6204c3.tar.gz
Bug #12956584 - MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY TO NEXT COMMAND/STMT
Followup fixes for --ps-protocol: 1) Incorrectly set ps_protocol variable instead of ps_protocol_enabled 2) disable_result_log was tested after calling handle_no_error() which would revert a temporary setting.
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 6b1f6645b09..806f35bb85a 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -133,7 +133,7 @@ static struct property prop_list[] = {
{ &disable_connect_log, 0, 1, 1, "$ENABLED_CONNECT_LOG" },
{ &disable_info, 0, 1, 1, "$ENABLED_INFO" },
{ &display_metadata, 0, 0, 0, "$ENABLED_METADATA" },
- { &ps_protocol, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
+ { &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
{ &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" },
{ &disable_result_log, 0, 0, 1, "$ENABLED_RESULT_LOG" },
{ &disable_warnings, 0, 0, 1, "$ENABLED_WARNINGS" }
@@ -7531,6 +7531,9 @@ 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
*/
@@ -7626,7 +7629,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 (!disable_result_log)
+ if (!dis_res)
{
/*
Not all statements creates a result set. If there is one we can
@@ -8821,7 +8824,7 @@ int main(int argc, char **argv)
close_statements();
break;
case Q_ENABLE_PS_PROTOCOL:
- set_property(command, P_PS, 1);
+ set_property(command, P_PS, ps_protocol);
break;
case Q_DISABLE_RECONNECT:
set_reconnect(&cur_con->mysql, 0);