Commit 73dfb402 authored by Rahul Anand's avatar Rahul Anand Committed by Robert Bindar

MDEV-20500: Bad error msg on disabling local infile

parent 8f8cc5f4
......@@ -29,7 +29,7 @@ DROP TABLE IF EXISTS t1;
create table t1(a int);
LOAD DATA LOCAL INFILE
'MYSQLTEST_VARDIR/std_data/numbers.txt' INTO TABLE test.t1;
ERROR 42000: The used command is not allowed with this MariaDB version
ERROR HY000: The used command is not allowed because the MariaDB server or client has disabled the local infile capability
SELECT count(*) from t1;
count(*)
0
......
......@@ -74,7 +74,7 @@ DROP TABLE IF EXISTS t1;
create table t1(a int);
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--Error ER_NOT_ALLOWED_COMMAND
--Error ER_LOAD_INFILE_CAPABILITY_DISABLED
eval LOAD DATA LOCAL INFILE
'$MYSQLTEST_VARDIR/std_data/numbers.txt' INTO TABLE test.t1;
......
......@@ -7945,3 +7945,6 @@ ER_PART_STARTS_BEYOND_INTERVAL
eng "%`s: STARTS is later than query time, first history partition may exceed INTERVAL value"
ER_GALERA_REPLICATION_NOT_SUPPORTED
eng "DDL-statement is forbidden as table storage engine does not support Galera replication"
ER_LOAD_INFILE_CAPABILITY_DISABLED
eng "The used command is not allowed because the MariaDB server or client has disabled the local infile capability"
rum "Comanda folosită nu este permisă deoarece clientul sau serverul MariaDB a dezactivat această capabilitate"
\ No newline at end of file
......@@ -4940,7 +4940,8 @@ mysql_execute_command(THD *thd)
if (!(thd->client_capabilities & CLIENT_LOCAL_FILES) ||
!opt_local_infile)
{
my_message(ER_NOT_ALLOWED_COMMAND, ER_THD(thd, ER_NOT_ALLOWED_COMMAND), MYF(0));
my_message(ER_LOAD_INFILE_CAPABILITY_DISABLED,
ER_THD(thd, ER_LOAD_INFILE_CAPABILITY_DISABLED), MYF(0));
goto error;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment