Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug1385352 5.7 #1796

Merged
merged 2 commits into from
Jul 17, 2017
Merged

Conversation

laurynas-biveinis
Copy link
Contributor

…GLOBAL STATUS and affects the global value)

SET STATEMENT ... FOR ... variable assignments depended on
lex->option_type being set to OPT_SESSION for the correct operation
(setting the current session and not the global variables). However,
SET STATEMENT ... FOR ... parser never set it, resulting in the
previous statement values reused. If a previous statement was SET
GLOBAL or SHOW GLOBAL STATUS, lex->option_type was OPT_GLOBAL, making
SET STATEMENT to operate on global variables. Fix by setting
lex->option_type to OPT_SESSION in SET STATEMENT parser grammar rule.
In 5.7, replace PT_start_set_stmt_option_value_list parse tree node with
PT_start_option_value_list_type, which takes variable type as an
argument, and pass OPT_SESSION to it. This also makes the former parse
tree node class redundant, thus remove it.
Copy link
Collaborator

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@gl-sergei gl-sergei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@laurynas-biveinis laurynas-biveinis merged commit bababb4 into percona:5.7 Jul 17, 2017
@laurynas-biveinis laurynas-biveinis deleted the bug1385352-5.7 branch July 17, 2017 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants