diff options
author | gluh@mysql.com/eagle.(none) <> | 2008-02-28 16:46:52 +0400 |
---|---|---|
committer | gluh@mysql.com/eagle.(none) <> | 2008-02-28 16:46:52 +0400 |
commit | 9d42a09675554ed84a237c98a85ad5b855c52d72 (patch) | |
tree | 27bc731a8940e594404bf9434eaf2ea42c43308e /mysql-test/r/symlink.result | |
parent | 314b2377c6a4b9bdd6be09378f0d3f2827755867 (diff) | |
download | mariadb-git-9d42a09675554ed84a237c98a85ad5b855c52d72.tar.gz |
Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(3rd version for 5.1)
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of 'mysql data home'/'any db name' in
DATA DIRECTORY & INDEX DIRECTORY is disallowed
Diffstat (limited to 'mysql-test/r/symlink.result')
-rw-r--r-- | mysql-test/r/symlink.result | 65 |
1 files changed, 28 insertions, 37 deletions
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 4eece9d5b5a..e4ae1d8ea28 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -100,23 +100,15 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1(a INT) -DATA DIRECTORY='TEST_DIR/master-data/mysql' -INDEX DIRECTORY='TEST_DIR/master-data/mysql'; -RENAME TABLE t1 TO user; -ERROR HY000: Can't create/write to file 'TEST_DIR/master-data/mysql/user.MYI' (Errcode: 17) -DROP TABLE t1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; +DATA DIRECTORY='TEST_DIR/tmp' +INDEX DIRECTORY='TEST_DIR/tmp'; +ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +CREATE TABLE t2(a INT) +DATA DIRECTORY='TEST_DIR/tmp' +INDEX DIRECTORY='TEST_DIR/tmp'; +RENAME TABLE t2 TO t1; +ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +DROP TABLE t2; show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( @@ -139,26 +131,25 @@ a 42 drop table t1; End of 4.1 tests -CREATE DATABASE db1; -CREATE DATABASE db2; -USE db2; -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -b -1 -RESET QUERY CACHE; -USE db1; SET SESSION keep_files_on_create = TRUE; CREATE TABLE t1 (a INT) ENGINE MYISAM; -Got one of the listed errors -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; -a -SET SESSION keep_files_on_create = DEFAULT; -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; +ERROR HY000: Can't create/write to file './test/t1.MYD' (Errcode: 17) +SET SESSION keep_files_on_create = FALSE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +DROP TABLE t1; End of 5.0 tests +CREATE TABLE t1(a INT) +INDEX DIRECTORY='TEST_DIR/master-data/mysql'; +ERROR HY000: Incorrect arguments to INDEX DIRECORY +CREATE TABLE t1(a INT) +DATA DIRECTORY='TEST_DIR/master-data/test'; +ERROR HY000: Incorrect arguments to DATA DIRECORY +CREATE TABLE t1(a INT) +DATA DIRECTORY='TEST_DIR/master-data/'; +DROP TABLE t1; +CREATE TABLE t1(a INT) +INDEX DIRECTORY='TEST_DIR/master-data'; +DROP TABLE t1; +CREATE TABLE t1(a INT) +INDEX DIRECTORY='TEST_DIR/master-data_var'; +ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2) |