{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/8426","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/8426/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/8426/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/8426/events","html_url":"https://github.com/pingcap/tidb/pull/8426","id":383833002,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMjA3Mzkx","number":8426,"title":"executor,planner: Improve SET PASSWORD","user":{"login":"morgo","id":57982,"node_id":"MDQ6VXNlcjU3OTgy","avatar_url":"https://avatars2.githubusercontent.com/u/57982?v=4","gravatar_id":"","url":"https://api.github.com/users/morgo","html_url":"https://github.com/morgo","followers_url":"https://api.github.com/users/morgo/followers","following_url":"https://api.github.com/users/morgo/following{/other_user}","gists_url":"https://api.github.com/users/morgo/gists{/gist_id}","starred_url":"https://api.github.com/users/morgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgo/subscriptions","organizations_url":"https://api.github.com/users/morgo/orgs","repos_url":"https://api.github.com/users/morgo/repos","events_url":"https://api.github.com/users/morgo/events{/privacy}","received_events_url":"https://api.github.com/users/morgo/received_events","type":"User","site_admin":false},"labels":[{"id":541179553,"node_id":"MDU6TGFiZWw1NDExNzk1NTM=","url":"https://api.github.com/repos/pingcap/tidb/labels/type/compatibility","name":"type/compatibility","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-23T13:54:58Z","updated_at":"2018-11-26T01:37:20Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/8426","html_url":"https://github.com/pingcap/tidb/pull/8426","diff_url":"https://github.com/pingcap/tidb/pull/8426.diff","patch_url":"https://github.com/pingcap/tidb/pull/8426.patch"},"body":"<!--\r\nThank you for contributing to TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/tidb/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.\r\n-->\r\n\r\n### What problem does this PR solve? <!--add issue link with summary if exists-->\r\n\r\nFixes #7522\r\n\r\n### What is changed and how it works?\r\n\r\n* Set password was too strict in privilege checking, and required SUPER for all use cases.  Now it only requires SUPER for changing other user's passwords.\r\n* Set password did not use the AuthUsername + AuthPassword session properties.  So if a user account was a wildcard, it was not possible to change the password.\r\n* Error messages/codes are now mysql compatible.\r\n\r\nThis PR will conflict with #8417 as they both add the same error to the executor.  I will see which one is merged first and then fix the code :-)\r\n\r\nThere remains an issue common to all GRANT/SET password/CREATE user commands in that they do not invalidate the privilege cache (as MySQL versions do).  See https://github.com/pingcap/tidb/issues/8427\r\n\r\n### Check List <!--REMOVE the items that are not applicable-->\r\n\r\nTests <!-- At least one of them must be included. -->\r\n\r\n - Unit test\r\n - Manual test (add detailed scripts or steps below)\r\n\r\nCode changes\r\n\r\n - minimal\r\n\r\nSide effects\r\n\r\n - Breaking backward compatibility (broken apps)\r\n\r\nRelated changes\r\n\r\n - Need to be included in the release note\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/pingcap/tidb/8426)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/441494453","html_url":"https://github.com/pingcap/tidb/pull/8426#issuecomment-441494453","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/8426","id":441494453,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTQ5NDQ1Mw==","user":{"login":"morgo","id":57982,"node_id":"MDQ6VXNlcjU3OTgy","avatar_url":"https://avatars2.githubusercontent.com/u/57982?v=4","gravatar_id":"","url":"https://api.github.com/users/morgo","html_url":"https://github.com/morgo","followers_url":"https://api.github.com/users/morgo/followers","following_url":"https://api.github.com/users/morgo/following{/other_user}","gists_url":"https://api.github.com/users/morgo/gists{/gist_id}","starred_url":"https://api.github.com/users/morgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgo/subscriptions","organizations_url":"https://api.github.com/users/morgo/orgs","repos_url":"https://api.github.com/users/morgo/repos","events_url":"https://api.github.com/users/morgo/events{/privacy}","received_events_url":"https://api.github.com/users/morgo/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T01:37:20Z","updated_at":"2018-11-26T01:37:20Z","author_association":"MEMBER","body":"PTAL @tiancaiamao "}}
{"actor":{"display_login":"morgo"}}