[MXS-76] core/dbusers.c needs better error messages Created: 2015-04-01 Updated: 2015-04-14 Resolved: 2015-04-01 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | None |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 1.1.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kolbe Kegel (Inactive) | Assignee: | Timofey Turenko |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The error messages generated by core/dbusers.c are poor. Example 1:
Example 2:
It's strange that the same messages are reproduced so many times in the source:
That same message (once with a mis-spelling of mysql as msql) occurs 4 times in the same source file! In some instances, the message doesn't describe the problem accurately at all. The messages at lines 383 and 489 are generated after executing LOAD_MYSQL_DATABASE_NAMES, which is this query:
That query is actually checking whether the user has the SHOW DATABASES privilege, but the error message itself just refers to the select privilege and says nothing at all about SHOW DATABASES. This message should obviously be updated to describe the correct privilege. I really can't understand why the very same logic and errors exist multiple times in this single source file. Surely that could be refactored and consolidated? |
| Comments |
| Comment by markus makela [ 2015-04-01 ] |
|
Error message is now "%s: Unable to load database grant information, MaxScale authentication will proceed without including database permissions. To correct this GRANT SHOW DATABASES ON *.* privilege to the user %s." |