summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-11-06 13:44:59 -0800
committerIgor Babaev <igor@askmonty.org>2011-11-06 13:44:59 -0800
commite0500dbc3ac99fc366982f721418fb67c1961cde (patch)
treeb0f3b14e639e12cc17fb25e0544dfe06ac536d5c /storage/myisam
parente0c1b3f24246d22e6785315f9a8448bd9a590422 (diff)
parentff92a3af8bf262447e5ccee3e6929c4088ccbedc (diff)
downloadmariadb-git-e0500dbc3ac99fc366982f721418fb67c1961cde.tar.gz
Merge.
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_dbug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/myisam/mi_dbug.c b/storage/myisam/mi_dbug.c
index ab85ece07ab..76d5d13fc5b 100644
--- a/storage/myisam/mi_dbug.c
+++ b/storage/myisam/mi_dbug.c
@@ -173,6 +173,7 @@ my_bool check_table_is_closed(const char *name, const char *where)
DBUG_ENTER("check_table_is_closed");
(void) fn_format(filename,name,"",MI_NAME_IEXT,4+16+32);
+ pthread_mutex_lock(&THR_LOCK_myisam);
for (pos=myisam_open_list ; pos ; pos=pos->next)
{
MI_INFO *info=(MI_INFO*) pos->data;
@@ -183,10 +184,12 @@ my_bool 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_myisam);
DBUG_RETURN(1);
}
}
}
+ pthread_mutex_unlock(&THR_LOCK_myisam);
DBUG_RETURN(0);
}
#endif /* EXTRA_DEBUG */