diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-01-25 23:12:35 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-01-27 18:54:12 +0100 |
commit | 2175bfce3e9da8332f10ab0e0286dc93915533a2 (patch) | |
tree | b45ab5e6be1ed5619c229202db5139d69b3cbc23 /mysql-test | |
parent | 21f9037186f8a4bfb45486b9c28dd146e9df0e00 (diff) | |
download | mariadb-git-2175bfce3e9da8332f10ab0e0286dc93915533a2.tar.gz |
Crude "auto-load-data-local-infile" modemariadb-5.5.63
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.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/mysql.result | 26 | ||||
-rw-r--r-- | mysql-test/t/mysql.test | 22 |
2 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 8a24128daa2..ffa5d020153 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -587,3 +587,29 @@ a 2 drop table "a1\""b1"; set sql_mode=default; +create table t1 (a text); +select count(*) from t1; +count(*) +41 +truncate table t1; +select count(*) from t1; +count(*) +41 +truncate table t1; +select count(*) from t1; +count(*) +0 +truncate table t1; +select count(*) from t1; +count(*) +0 +truncate table t1; +select count(*) from t1; +count(*) +41 +truncate table t1; +select count(*) from t1; +count(*) +0 +truncate table t1; +drop table t1; diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 87756768c7f..f526a3fea91 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -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; |