diff options
Diffstat (limited to 'storage/myisammrg')
-rw-r--r-- | storage/myisammrg/myrg_locking.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/myisammrg/myrg_locking.c b/storage/myisammrg/myrg_locking.c index a07833bc829..4f1e3f844a1 100644 --- a/storage/myisammrg/myrg_locking.c +++ b/storage/myisammrg/myrg_locking.c @@ -37,7 +37,15 @@ int myrg_lock_database(MYRG_INFO *info, int lock_type) (file->table)->owned_by_merge = TRUE; #endif if ((new_error=mi_lock_database(file->table,lock_type))) + { error=new_error; + if (lock_type != F_UNLCK) + { + while (--file >= info->open_tables) + mi_lock_database(file->table, F_UNLCK); + break; + } + } } return(error); } |