executor: fix drop role not work as expected in the show result. #29667
executor: fix drop role not work as expected in the show result. #29667ti-chi-bot merged 3 commits intopingcap:masterfrom 7yyo:drop_role
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
/run-all-tests |
mjonss
left a comment
There was a problem hiding this comment.
LGTM but could you also check if there are more bugs like this?
| // begin a transaction to delete a user. | ||
| sql.Reset() | ||
| sqlexec.MustFormatSQL(sql, `DELETE FROM %n.%n WHERE Host = %? and User = %?;`, mysql.SystemDB, mysql.UserTable, user.Hostname, user.Username) | ||
| sqlexec.MustFormatSQL(sql, `DELETE FROM %n.%n WHERE Host = %? and User = %?;`, mysql.SystemDB, mysql.UserTable, strings.ToLower(user.Hostname), user.Username) |
There was a problem hiding this comment.
I think there might be another case in line 680:
sqlexec.MustFormatSQL(sql, `DELETE IGNORE FROM %n.%n WHERE FROM_HOST=%? and FROM_USER=%? and TO_HOST=%? and TO_USER=%?`, mysql.SystemDB, mysql.RoleEdgeTable, role.Hostname, role.Username, user.Hostname, user.Username)There was a problem hiding this comment.
I'm not sure if it needs to be modified. Because this is not the mysql.user table, currently, create user will lowercase hostname, so I think all SQL involving mysql.user hostname should be changed to lowercase. I'm not sure about the other tables.
I added some other modifications, please help double confirm whether it is correct, thank you.
|
/run-integration-tests |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 2df1e20 |
|
/run-cherry-picker release-5.3 |
What problem does this PR solve?
Issue Number: close #29655
Problem Summary:
fix drop role not work as expected in the show result.
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note