| 1 |
'#--------------------FN_DYNVARS_037_01-------------------------#' |
| 2 |
SET @@global.local_infile = 0; |
| 3 |
connect con1,localhost,root,,,,; |
| 4 |
connection con1; |
| 5 |
SELECT @@global.local_infile; |
| 6 |
@@global.local_infile |
| 7 |
0 |
| 8 |
SET @@global.local_infile = 1; |
| 9 |
connect con2,localhost,root,,,,; |
| 10 |
connection con2; |
| 11 |
SELECT @@global.local_infile; |
| 12 |
@@global.local_infile |
| 13 |
1 |
| 14 |
disconnect con2; |
| 15 |
'#--------------------FN_DYNVARS_037_02-------------------------#' |
| 16 |
connection con1; |
| 17 |
'-----Checking LOAD DATA when local_infile is 1-------' |
| 18 |
SET @@global.local_infile = 1; |
| 19 |
DROP TABLE IF EXISTS t1; |
| 20 |
create table t1(a int); |
| 21 |
LOAD DATA LOCAL INFILE |
| 22 |
'MYSQLTEST_VARDIR/std_data/numbers.txt' INTO TABLE test.t1; |
| 23 |
SELECT count(*) from t1; |
| 24 |
count(*) |
| 25 |
9 |
| 26 |
'-----Checking LOAD DATA when local_infile is 0-------' |
| 27 |
SET @@global.local_infile = 0; |
| 28 |
DROP TABLE IF EXISTS t1; |
| 29 |
create table t1(a int); |
| 30 |
LOAD DATA LOCAL INFILE |
| 31 |
'MYSQLTEST_VARDIR/std_data/numbers.txt' INTO TABLE test.t1; |
| 32 |
ERROR HY000: The used command is not allowed because the MariaDB server or client has disabled the local infile capability |
| 33 |
SELECT count(*) from t1; |
| 34 |
count(*) |
| 35 |
0 |
| 36 |
DROP TABLE t1; |
| 37 |
SET @@global.local_infile = 1; |