Status: Closed (View Workflow)
5.5, 10.1, 10.2, 10.3, 10.4
LOAD DATA LOCAL can be disabled in two different ways:
- It can be disabled on the server side by setting local_infile=0.
- It can be disabled on the client side by unsetting the CLIENT_LOCAL_FILES capability flag with mysql_real_connect or by unsetting the MYSQL_OPT_LOCAL_INFILE option with 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:
The generic error message for this error code is the following:
The used command is not allowed with this MariaDB version
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:
The used command is not allowed by the MariaDB server or client
It would be the least ambiguous if the error message said something like the following in this specific circumstance:
The used command is not allowed because the MariaDB server or client has disabled the local infile capability