mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user