diff options
author | unknown <kostja@bodhi.(none)> | 2007-07-14 02:04:48 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-07-14 02:04:48 +0400 |
commit | 31ea7d042ba48bd34a457bba138d2189f844731d (patch) | |
tree | ccedd61617353a865ce05b7b2dd6643ea3cda980 /sql/ha_ndbcluster.cc | |
parent | 6ba23b0ac9a4548de36386b4f892af9c7d471e97 (diff) | |
download | mariadb-git-31ea7d042ba48bd34a457bba138d2189f844731d.tar.gz |
A follow up after the patch for Bug#21074 - even though
we now have exclusive name lock on the table name in mysql_rm_table_part2,
we still should keep LOCK_open - some storage engines are not
ready for locking scope change and assume that LOCK_open is kept.
Still, the binary logging and query cache invalidation calls
moved out of LOCK_open scope.
Fixes some of the broken 5.1-runtime tests (tests break on asserts).
sql/ha_ndbcluster.cc:
Do not lock LOCK_open for mysql_rm_table_part2 - it does that
for us now.
sql/mysql_priv.h:
Remove an unused flag.
sql/sql_class.h:
Fix an unrelated compiler warning.
sql/sql_db.cc:
Adjust to the changed signature.
sql/sql_table.cc:
mysql_rm_table_part2: we need to keep LOCK_open while calling
storage engine functions, even though now
we have an exclusive lock on the table name. Some of them assume that it's
kept and attempt to unlock it.
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 393c2356404..24ce9946086 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -7019,8 +7019,6 @@ int ndbcluster_find_files(handlerton *hton, THD *thd, } } - // Lock mutex before deleting and creating frm files - pthread_mutex_lock(&LOCK_open); if (!global_read_lock) { // Delete old files @@ -7037,14 +7035,14 @@ int ndbcluster_find_files(handlerton *hton, THD *thd, FALSE, /* if_exists */ FALSE, /* drop_temporary */ FALSE, /* drop_view */ - TRUE, /* dont_log_query*/ - FALSE); /* need lock open */ + TRUE /* dont_log_query*/); /* Clear error message that is returned when table is deleted */ thd->clear_error(); } } + pthread_mutex_lock(&LOCK_open); // Create new files List_iterator_fast<char> it2(create_list); while ((file_name=it2++)) |