Commit fcc8da4d authored by unknown's avatar unknown

ndb: add missing LOCK_open

parent c3bb34a6
...@@ -5848,6 +5848,7 @@ int ndbcluster_drop_database_impl(const char *path) ...@@ -5848,6 +5848,7 @@ int ndbcluster_drop_database_impl(const char *path)
while ((tabname=it++)) while ((tabname=it++))
{ {
tablename_to_filename(tabname, tmp, FN_REFLEN - (tmp - full_path)-1); tablename_to_filename(tabname, tmp, FN_REFLEN - (tmp - full_path)-1);
VOID(pthread_mutex_lock(&LOCK_open));
if (ha_ndbcluster::delete_table(0, ndb, full_path, dbname, tabname)) if (ha_ndbcluster::delete_table(0, ndb, full_path, dbname, tabname))
{ {
const NdbError err= dict->getNdbError(); const NdbError err= dict->getNdbError();
...@@ -5857,6 +5858,7 @@ int ndbcluster_drop_database_impl(const char *path) ...@@ -5857,6 +5858,7 @@ int ndbcluster_drop_database_impl(const char *path)
ret= ndb_to_mysql_error(&err); ret= ndb_to_mysql_error(&err);
} }
} }
VOID(pthread_mutex_unlock(&LOCK_open));
} }
DBUG_RETURN(ret); DBUG_RETURN(ret);
} }
......
...@@ -286,6 +286,7 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share, ...@@ -286,6 +286,7 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share,
int error; int error;
DBUG_ENTER("ndbcluster_binlog_open_table"); DBUG_ENTER("ndbcluster_binlog_open_table");
safe_mutex_assert_owner(&LOCK_open);
init_tmp_table_share(table_share, share->db, 0, share->table_name, init_tmp_table_share(table_share, share->db, 0, share->table_name,
share->key); share->key);
if ((error= open_table_def(thd, table_share, 0))) if ((error= open_table_def(thd, table_share, 0)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment