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

executor: fix grant operation in ANSI_QUOTES sql mode #8561

Merged
merged 4 commits into from
Dec 4, 2018

Conversation

tiancaiamao
Copy link
Contributor

@tiancaiamao tiancaiamao commented Dec 3, 2018

What problem does this PR solve?

If user set sql mode to ANSI_QUOTES, this statement fails:

mysql> grant all privileges on video_ulimit.* to web@'%' identified by 'eDrkrhZ>l2sV';
ERROR 1054 (42S22): Unknown column '%' in ''

Because grant operation use double quotes "" to concat SQL string, which can't work under ANSI_QUOTES mode.

Similar to #8353

What is changed and how it works?

Change "" to ''

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

This change is Reviewable

@tiancaiamao
Copy link
Contributor Author

/run-all-tests
PTAL @jackysp @lysu

@tiancaiamao
Copy link
Contributor Author

/run-unit-test

Copy link
Member

@jackysp jackysp 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

@lysu lysu left a comment

Choose a reason for hiding this comment

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

LGTM

@lysu lysu added the status/LGT2 Indicates that a PR has LGTM 2. label Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/privilege status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants