Bug #97079 Nonsensical error message when local_infile is disabled
Submitted: 2 Oct 2019 8:51 Modified: 22 Oct 2019 12:27
Reporter: Bernt Marius Johnsen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[2 Oct 2019 8:51] Bernt Marius Johnsen
Description:
If local_infile is disabled (which is the default) and LOAD DATA LOCAL INFILE is attempted, mysql issues the message

ERROR 1148 (42000): The used command is not allowed with this MySQL version

This is misleading since it is not related to the MySQL version, but to whether local_infile is enabled or not.

How to repeat:
Do LOAD DATA LOCAL INFILE without enabling local_infile 

Suggested fix:
Come with  a more enlightening error message.
[22 Oct 2019 12:27] Paul DuBois
Posted by developer:
 
Fixed in 8.0.19.

Previously, the server returned this error message for attempts to
use LOAD DATA LOCAL with LOCAL capability disabled: "The used command
is not allowed with this MySQL version". This was misleading because
the error condition is not related to the MySQL version. The server
now returns an error code of ER_CLIENT_LOCAL_FILES_DISABLED and this
message: "Loading local data is disabled; this must be enabled on
both the client and server side".
[18 Feb 2021 9:32] Erlend Dahl
Bug#94396 Error message too broad: The used command is not allowed with this MySQL version

was marked as a duplicate.