mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
92fd658327
Issue was two fold (both in MyISAM and Aria) - optimize and repair failed if there was an old .TMM file around. As optimized and repair are protected against multiple execution, I decided to change so that we just truncate the file if it exists. - I had missed to check for error condition if creation of the temporary index file failed. This caused the strange behaviour that it looked as if optimized would have worked once.
25 lines
767 B
Text
25 lines
767 B
Text
#
|
|
# MDEV-5543 MyISAM repair unsafe usage of TMD files
|
|
#
|
|
--source include/have_symlink.inc
|
|
--source include/not_windows.inc
|
|
--source include/have_maria.inc
|
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
|
|
insert t1 values (1);
|
|
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
repair table t1;
|
|
drop table t1;
|
|
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
|
|
insert t2 values (1);
|
|
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
repair table t2;
|
|
drop table t2;
|
|
|
|
--list_files $MYSQL_TMP_DIR foobar5543
|
|
|