diff options
author | Sergey Vojtovich <svoj@sun.com> | 2010-04-01 18:49:02 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2010-04-01 18:49:02 +0400 |
commit | ab1242b9e30c34e50f28146d2ff9953ec40749ee (patch) | |
tree | 890b3635bd4f971409a5a17fb8571d2944435d2c /mysql-test/r/symlink.result | |
parent | 454c003a5c5a31a8d59ba4ab54d3b3a90a609752 (diff) | |
download | mariadb-git-ab1242b9e30c34e50f28146d2ff9953ec40749ee.tar.gz |
BUG#40980 - Drop table can remove another MyISAM table's
data and index files
It was possible if DATA/INDEX DIRECTORY is pointing to
symlinked MySQL data home directory.
Do not allow to drop data/index files implicitly symlinked
to data home directory. For such tables remove symlink only.
mysql-test/r/symlink.result:
A test case for BUG#40980.
mysql-test/t/symlink.test:
A test case for BUG#40980.
storage/myisam/mi_delete_table.c:
Do not allow to drop data/index files implicitly symlinked
to data home directory. For such tables remove symlink only.
Diffstat (limited to 'mysql-test/r/symlink.result')
-rw-r--r-- | mysql-test/r/symlink.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 245dcec04da..4dac7443135 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -168,4 +168,16 @@ Warning 1618 <DATA DIRECTORY> option ignored Warning 1618 <INDEX DIRECTORY> option ignored DROP TABLE t1; SET @@SQL_MODE=@OLD_SQL_MODE; +# +# BUG#40980 - Drop table can remove another MyISAM table's +# data and index files +# +CREATE TABLE user(a INT) DATA DIRECTORY='MYSQL_TMP_DIR/mysql' + INDEX DIRECTORY='MYSQL_TMP_DIR/mysql'; +FLUSH TABLE user; +# Symlinking mysql database to tmpdir +FLUSH TABLE mysql.user; +DROP TABLE user; +FLUSH TABLE mysql.user; +SELECT * FROM mysql.user; End of 5.1 tests |