Skip to content
Browse files

Bug #12956584 - MYSQLTEST: --ENABLE_X OR --DISABLE_X APPLYING ONLY T…

…O 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.

--BZR--
revision-id: bjorn.munch@oracle.com-20110915085319-g8cuzey8ychdscgs
property-branch-nick: oneable-55
testament3-sha1: 3d6c739959119278b010139c0f4b546a2e9a83dc
  • Loading branch information...
1 parent ce4db66 commit 7eed6d4b369a9ee05a4a0b1ab9e3ad2d4a0ef355 @bjornmu bjornmu committed
Showing with 6 additions and 3 deletions.
  1. +6 −3 client/mysqltest.cc
View
9 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);

0 comments on commit 7eed6d4

Please sign in to comment.
Something went wrong with that request. Please try again.