mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with 5.2
This commit is contained in:
@ -949,9 +949,6 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
|
||||
remove_db_from_cache(db);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
|
||||
Drop_table_error_handler err_handler(thd->get_internal_handler());
|
||||
thd->push_internal_handler(&err_handler);
|
||||
|
||||
error= -1;
|
||||
/*
|
||||
We temporarily disable the binary log while dropping the objects
|
||||
@ -984,8 +981,8 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
|
||||
error = 0;
|
||||
reenable_binlog(thd);
|
||||
}
|
||||
thd->pop_internal_handler();
|
||||
}
|
||||
|
||||
if (!silent && deleted>=0)
|
||||
{
|
||||
const char *query;
|
||||
@ -1214,16 +1211,34 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
|
||||
else
|
||||
{
|
||||
strxmov(filePath, org_path, "/", file->name, NullS);
|
||||
if (my_delete_with_symlink(filePath,MYF(MY_WME)))
|
||||
/*
|
||||
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)
|
||||
{
|
||||
goto err;
|
||||
my_error(EE_DELETE, MYF(0), filePath, my_errno);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (thd->killed ||
|
||||
(tot_list && mysql_rm_table_part2(thd, tot_list, 1, 0, 1, 1)))
|
||||
|
||||
if (thd->killed)
|
||||
goto err;
|
||||
|
||||
if (tot_list)
|
||||
{
|
||||
int res= 0;
|
||||
Drop_table_error_handler err_handler(thd->get_internal_handler());
|
||||
|
||||
thd->push_internal_handler(&err_handler);
|
||||
res= mysql_rm_table_part2(thd, tot_list, 1, 0, 1, 1);
|
||||
thd->pop_internal_handler();
|
||||
if (res)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Remove RAID directories */
|
||||
{
|
||||
List_iterator<String> it(raid_dirs);
|
||||
|
Reference in New Issue
Block a user