MDEV-5612 - my_rename() deletes files when it shouldn't

Ported fix for MySQL BUG#51861.
This commit is contained in:
Sergey Vojtovich 2014-02-26 12:55:28 +04:00
commit 9d918f41d3
3 changed files with 24 additions and 8 deletions

View file

@ -1917,3 +1917,12 @@ SELECT * FROM t1;
DROP TABLE t1;
--echo End of 5.1 tests
--echo #
--echo # MDEV-5612 - my_rename() deletes files when it shouldn't
--echo #
CREATE TABLE t1(a INT NOT NULL) ENGINE=CSV;
move_file $MYSQLD_DATADIR/test/t1.CSV $MYSQLD_DATADIR/test/t2.CSV;
RENAME TABLE t1 TO t2;
SELECT * FROM t2;
DROP TABLE t2;