3419 Dmitry Shulga 2010-12-10 [merge]
Merge from mysql-5.5-bugteam for bug#54486.
modified:
sql/sql_db.cc
storage/myisam/mi_check.c
3418 Anitha Gopi 2010-12-10
Bug# 58831. Remove large_tests.alter_table from the weekly run
modified:
mysql-test/collections/mysql-trunk.weekly
=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc 2010-11-18 16:34:56 +0000
+++ b/sql/sql_db.cc 2010-12-10 12:52:55 +0000
@@ -795,14 +795,9 @@ bool mysql_rm_db(THD *thd,char *db,bool
}
}
- thd->push_internal_handler(&err_handler);
-
if (find_db_tables_and_rm_known_files(thd, dirp, db, path, &tables,
&found_other_files))
- {
- thd->pop_internal_handler();
goto exit;
- }
/*
Disable drop of enabled log tables, must be done before name locking.
@@ -816,7 +811,6 @@ bool mysql_rm_db(THD *thd,char *db,bool
table->table_name_length, table->table_name, true))
{
my_error(ER_BAD_LOG_STATEMENT, MYF(0), "DROP");
- thd->pop_internal_handler();
goto exit;
}
}
@@ -826,10 +820,7 @@ bool mysql_rm_db(THD *thd,char *db,bool
if (lock_table_names(thd, tables, NULL, thd->variables.lock_wait_timeout,
MYSQL_OPEN_SKIP_TEMPORARY) ||
lock_db_routines(thd, db))
- {
- thd->pop_internal_handler();
goto exit;
- }
/* mysql_ha_rm_tables() requires a non-null TABLE_LIST. */
if (tables)
@@ -842,6 +833,7 @@ bool mysql_rm_db(THD *thd,char *db,bool
deleted_tables++;
}
+ thd->push_internal_handler(&err_handler);
if (thd->killed ||
(tables && mysql_rm_table_no_locks(thd, tables, true, false, true, true)))
{
@@ -1095,8 +1087,16 @@ static bool find_db_tables_and_rm_known_
else
{
strxmov(filePath, path, "/", file->name, NullS);
- if (mysql_file_delete_with_symlink(key_file_misc, filePath, MYF(MY_WME)))
- DBUG_RETURN(true);
+ /*
+ We ignore ENOENT error in order to skip files that was deleted
+ by concurrently running statement like REAPIR TABLE ...
+ */
+ if (my_delete_with_symlink(filePath, MYF(0)) &&
+ my_errno != ENOENT)
+ {
+ my_error(EE_DELETE, MYF(0), filePath, my_errno);
+ DBUG_RETURN(true);
+ }
}
}
*tables= tot_list;
=== modified file 'storage/myisam/mi_check.c'
--- a/storage/myisam/mi_check.c 2010-07-23 20:15:07 +0000
+++ b/storage/myisam/mi_check.c 2010-12-10 11:32:58 +0000
@@ -1748,6 +1748,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)
Attachment: [text/bzr-bundle] bzr/dmitry.shulga@oracle.com-20101210125255-6pb95vnvpowxphti.bundle
| Thread |
|---|
| • bzr push into mysql-trunk-bugfixing branch (Dmitry.Shulga:3418 to 3419)Bug#54486 | Dmitry Shulga | 10 Dec |