diff options
Diffstat (limited to 'storage/maria/ma_dbug.c')
-rw-r--r-- | storage/maria/ma_dbug.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/maria/ma_dbug.c b/storage/maria/ma_dbug.c index 4ae45ca9b7a..ea69975ad4b 100644 --- a/storage/maria/ma_dbug.c +++ b/storage/maria/ma_dbug.c @@ -180,6 +180,7 @@ my_bool _ma_check_table_is_closed(const char *name, const char *where) DBUG_ENTER("_ma_check_table_is_closed"); (void) fn_format(filename,name,"",MARIA_NAME_IEXT,4+16+32); + pthread_mutex_lock(&THR_LOCK_maria); for (pos=maria_open_list ; pos ; pos=pos->next) { MARIA_HA *info=(MARIA_HA*) pos->data; @@ -190,10 +191,12 @@ my_bool _ma_check_table_is_closed(const char *name, const char *where) { fprintf(stderr,"Warning: Table: %s is open on %s\n", name,where); DBUG_PRINT("warning",("Table: %s is open on %s", name,where)); + pthread_mutex_unlock(&THR_LOCK_maria); DBUG_RETURN(1); } } } + pthread_mutex_unlock(&THR_LOCK_maria); DBUG_RETURN(0); } #endif /* EXTRA_DEBUG */ |