diff options
author | unknown <istruewing@stella.local> | 2008-03-14 12:02:11 +0100 |
---|---|---|
committer | unknown <istruewing@stella.local> | 2008-03-14 12:02:11 +0100 |
commit | e79249f81bbb7158fb263455e531bda4117b5fc9 (patch) | |
tree | b52789d6b0503cf1a56ee2fea977be99a7287207 /mysql-test/t/symlink.test | |
parent | 28eb7e60d50795d110d4fe2d6477acdeb4c725d5 (diff) | |
parent | 269ebe54211cf96c4e64fa7268a1414588ca1de8 (diff) | |
download | mariadb-git-e79249f81bbb7158fb263455e531bda4117b5fc9.tar.gz |
Manual merge
configure.in:
Auto merged
mysql-test/r/func_misc.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/partition.result:
Auto merged
mysql-test/r/partition_symlink.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
mysql-test/t/partition.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/partition_info.cc:
Auto merged
sql/partition_info.h:
Auto merged
sql/rpl_rli.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_parse.cc:
Manual merge. Needs later fix. New code in create table was not
accepted. Needs to be added to mysql_create_table_no_lock().
Diffstat (limited to 'mysql-test/t/symlink.test')
-rw-r--r-- | mysql-test/t/symlink.test | 92 |
1 files changed, 42 insertions, 50 deletions
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index eaad45d7d5d..5802e65df1e 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -123,29 +123,22 @@ drop table t1; # # BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE # +--write_file $MYSQLTEST_VARDIR/tmp/t1.MYI +EOF --replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1 eval CREATE TABLE t1(a INT) -DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql' -INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'; +DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' +INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +eval CREATE TABLE t2(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' +INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; --replace_result $MYSQLTEST_VARDIR TEST_DIR --error 1 -RENAME TABLE t1 TO user; -DROP TABLE t1; - -# -# Test specifying DATA DIRECTORY that is the same as what would normally -# have been chosen. (Bug #8707) -# -disable_query_log; -eval create table t1 (i int) data directory = "$MYSQLTEST_VARDIR/master-data/test/"; -enable_query_log; -show create table t1; -drop table t1; -disable_query_log; -eval create table t1 (i int) index directory = "$MYSQLTEST_VARDIR/master-data/test/"; -enable_query_log; -show create table t1; -drop table t1; +RENAME TABLE t2 TO t1; +DROP TABLE t2; +--remove_file $MYSQLTEST_VARDIR/tmp/t1.MYI # # Bug#8706 - temporary table with data directory option fails @@ -189,45 +182,44 @@ drop table t1; # # Bug #29325: create table overwrites .MYD file of other table (datadir) # - -CREATE DATABASE db1; -CREATE DATABASE db2; - -USE db2; ---disable_query_log -eval CREATE TABLE t1 (b INT) ENGINE MYISAM -DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; ---enable_query_log - -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -RESET QUERY CACHE; - -USE db1; - -#no warning from create table SET SESSION keep_files_on_create = TRUE; +--write_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD +EOF --disable_abort_on_error ---error 1,1 +--error 1,1,ER_TABLE_EXISTS_ERROR CREATE TABLE t1 (a INT) ENGINE MYISAM; +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD; --enable_abort_on_error - -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; - -SET SESSION keep_files_on_create = DEFAULT; - -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; - +SET SESSION keep_files_on_create = FALSE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +DROP TABLE t1; --echo End of 5.0 tests # +# Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY +# +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/test'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +eval CREATE TABLE t1(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/'; +DROP TABLE t1; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +eval CREATE TABLE t1(a INT) +INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data'; +DROP TABLE t1; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1 +eval CREATE TABLE t1(a INT) +INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data_var'; # BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY clause is # silently ignored # |