Commit 56b65d33 authored by Alexander Barkov's avatar Alexander Barkov

Respect the --secure-file-priv server options when dealing

with tables having FILE_NAME.

modified:
  mysql-test/suite/connect/r/secure_file_priv.result
  mysql-test/suite/connect/t/secure_file_priv.test
parent 4bba2554
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='/media/DATA/maria-bzr/maria-10.0-connect/mysql-test/var/mysqld.1/data//t1.dbf'; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='DATADIR/t1.dbf';
ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='/media/DATA/maria-bzr/maria-10.0-connect/mysql-test/var/tmp//t1.dbf'; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='SECUREDATADIR/t1.dbf';
INSERT INTO t1 VALUES (10); INSERT INTO t1 VALUES (10);
SELECT * FROM t1; SELECT * FROM t1;
a a
......
let $MYSQLD_DATADIR= `select @@datadir`; let $DATADIR= `select @@datadir`;
let $MYSQLD_SECUREDIR= `select @@secure_file_priv`; let $SECUREDIR= `select @@secure_file_priv`;
--replace_result $DATADIR DATADIR
--error ER_OPTION_PREVENTS_STATEMENT --error ER_OPTION_PREVENTS_STATEMENT
--eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='$MYSQLD_DATADIR/t1.dbf' --eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='$DATADIR/t1.dbf'
--eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='$MYSQLD_SECUREDIR/t1.dbf' --replace_result $SECUREDIR SECUREDATADIR
--eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='$SECUREDIR/t1.dbf'
INSERT INTO t1 VALUES (10); INSERT INTO t1 VALUES (10);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
--remove_file $MYSQLD_SECUREDIR/t1.dbf --remove_file $SECUREDIR/t1.dbf
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