[MDEV-20500] Server prints bad error message when user executes LOAD DATA LOCAL and it is disabled Created: 2019-09-04 Updated: 2020-03-03 Resolved: 2020-03-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser, Server |
| Affects Version/s: | 5.5, 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.5.2 |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Robert Bindar |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | beginner-friendly | ||
| Description |
|
LOAD DATA LOCAL can be disabled in two different ways:
https://mariadb.com/kb/en/library/server-system-variables/#local_infile
https://mariadb.com/kb/en/library/mysql_real_connect/ https://mariadb.com/kb/en/library/mysql_optionsv/ When LOAD DATA LOCAL is disabled and the user tries executing LOAD DATA LOCAL, the server throws an error with error code ER_NOT_ALLOWED_COMMAND: https://github.com/MariaDB/server/blob/mariadb-10.2.26/sql/sql_parse.cc#L4568 The generic error message for this error code is the following:
https://github.com/MariaDB/server/blob/mariadb-10.2.26/sql/share/errmsg-utf8.txt#L3373 Unfortunately, this error message isn't really true in this case. The command is allowed with this MariaDB version. It is not allowed with the current configuration. It would be more accurate if the generic error message said something like the following:
It would be the least ambiguous if the error message said something like the following in this specific circumstance:
|