summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_check.c
diff options
context:
space:
mode:
authorDmitry Shulga <Dmitry.Shulga@oracle.com>2010-12-10 13:48:50 +0600
committerDmitry Shulga <Dmitry.Shulga@oracle.com>2010-12-10 13:48:50 +0600
commit5ca6880defa1f04f754000c89bf08ea8173456e7 (patch)
tree1cc4c5bb18a55068f43d3d7921af3eab211c7faf /storage/myisam/mi_check.c
parent50d1f9f36830dc4f52a8db283dafc2753d1e6b01 (diff)
downloadmariadb-git-5ca6880defa1f04f754000c89bf08ea8173456e7.tar.gz
Fixed bug#54486 - assert in my_seek, concurrent
DROP/CREATE SCHEMA, CREATE TABLE, REPAIR. The cause of assert was concurrent execution of DROP DATABASE and REPAIR TABLE where first statement deleted table's file .TMD at the same time as REPAIR TABLE tried to read file details from the old file that was just removed. Additionally was fixed trouble when DROP TABLE try delete all files belong to table being dropped at the same time when REPAIR TABLE statement has just deleted .TMD file. No regression test added because this would require adding a sync point to mysys/my_redel.c. Since this bug is not present in 5.5+, adding test coverage was considered unnecessary. The patch has been verified using RQG testing. sql/sql_db.cc: mysql_rm_known_files() modified: ignore possible ENOENT error when trying delete all table's files. Such aggressive algorithm permits skip already deleted (in another thread) files. Installation of Drop_table_error_handler as internal error handler moved from mysql_rm_db() to mysql_rm_knowns_files() near to place where source of possible errors (call to mysql_rm_table_part2) located. storage/myisam/mi_check.c: mi_repair() was modified: set param->retry_repair= 0 in order to don't call following failover procedure in ha_myisam::repair().
Diffstat (limited to 'storage/myisam/mi_check.c')
-rw-r--r--storage/myisam/mi_check.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index 8e3864d1c44..935465e7edf 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -1741,6 +1741,8 @@ err:
MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
mi_open_datafile(info,share,name,-1))
got_error=1;
+
+ param->retry_repair= 0;
}
}
if (got_error)