mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Crude "auto-load-data-local-infile" mode
Disable LOAD DATA LOCAL INFILE suport by default and auto-enable it for the duration of one query, if the query string starts with the word "load". In all other cases the application should enable LOAD DATA LOCAL INFILE support explicitly.
This commit is contained in:
@@ -656,3 +656,25 @@ show create table "a1\""b1";
|
||||
select * from "a1\""b1";
|
||||
drop table "a1\""b1";
|
||||
set sql_mode=default;
|
||||
|
||||
#
|
||||
# mysql --local-infile
|
||||
#
|
||||
--let $ldli = load data local infile '$MYSQLTEST_VARDIR/tmp/bug.sql' into table test.t1;
|
||||
create table t1 (a text);
|
||||
--exec $MYSQL -e "$ldli"
|
||||
select count(*) from t1; truncate table t1;
|
||||
--exec $MYSQL --enable-local-infile -e "$ldli"
|
||||
select count(*) from t1; truncate table t1;
|
||||
--error 1
|
||||
--exec $MYSQL --disable-local-infile -e "$ldli"
|
||||
select count(*) from t1; truncate table t1;
|
||||
--error 1
|
||||
--exec $MYSQL -e "/*q*/$ldli"
|
||||
select count(*) from t1; truncate table t1;
|
||||
--exec $MYSQL --enable-local-infile -e "/*q*/$ldli"
|
||||
select count(*) from t1; truncate table t1;
|
||||
--error 1
|
||||
--exec $MYSQL --disable-local-infile -e "/*q*/$ldli"
|
||||
select count(*) from t1; truncate table t1;
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user