Commit 32e8085d authored by Bjorn Munch's avatar Bjorn Munch

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.
parent 69e76a16
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment