[MDEV-20435] ALTER USER prints bad error message if specified user account does not exist Created: 2019-08-27 Updated: 2022-05-31 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System |
| Affects Version/s: | 10.4.7 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
GRANT prints a very nice error message if the specified user account does not exist and sql_mode has NO_AUTO_CREATE_USER set. In contrast, ALTER USER prints a generic error message, so the root cause can be difficult to determine in some cases. GRANT:
ALTER USER:
I think that ALTER USER's error message should be similar to the one used by GRANT in this case. |
| Comments |
| Comment by Robert Bindar [ 2019-10-01 ] | |||||||||||||||
|
serg can you please review https://github.com/MariaDB/server/commit/d87e079c4350ee0cdc8f80522b9c35c57c0c5928 ? | |||||||||||||||
| Comment by Sergei Golubchik [ 2020-04-23 ] | |||||||||||||||
|
I think it went a bit off. See how wrong_users is used — there are lots of commands that accept a list of users. They all (but not GRANT) print something at the end. This doesn't work very well when many users are specified. Consider GRANT ROLE for example:
The error and SHOW WARNINGS are:
I'd think the error should've been 1961, and two 1133 should be in SHOW WARNINGS only. GeoffMontee what do you think? | |||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2020-04-23 ] | |||||||||||||||
|
Hi serg, Your suggestion sounds reasonable to me. Thanks! |