summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2006-06-14 01:20:39 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2006-06-14 01:20:39 +0200
commit17f566506efaed3edd6d37e9ca2bed98dc402715 (patch)
tree4e6ecba423ffc33695b75f2deb0ef3801230a7a4
parent748f589ecde3fca1610db5e5512daacc6e14aba2 (diff)
downloadmariadb-git-17f566506efaed3edd6d37e9ca2bed98dc402715.tar.gz
ndb: add missing LOCK_open
-rw-r--r--sql/ha_ndbcluster.cc2
-rw-r--r--sql/ha_ndbcluster_binlog.cc1
2 files changed, 3 insertions, 0 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 94fb7e6eb5c..d8f4ddac73c 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -5848,6 +5848,7 @@ int ndbcluster_drop_database_impl(const char *path)
while ((tabname=it++))
{
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))
{
const NdbError err= dict->getNdbError();
@@ -5857,6 +5858,7 @@ int ndbcluster_drop_database_impl(const char *path)
ret= ndb_to_mysql_error(&err);
}
}
+ VOID(pthread_mutex_unlock(&LOCK_open));
}
DBUG_RETURN(ret);
}
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index af6eb74a236..022c8a021cb 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -286,6 +286,7 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share,
int error;
DBUG_ENTER("ndbcluster_binlog_open_table");
+ safe_mutex_assert_owner(&LOCK_open);
init_tmp_table_share(table_share, share->db, 0, share->table_name,
share->key);
if ((error= open_table_def(thd, table_share, 0)))