diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-11-30 22:38:25 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-11-30 22:38:25 +0300 |
commit | cd055f0efe330ace1d4d83536f1cbbeb1c8e0ab9 (patch) | |
tree | 2119379f97c4c8fea49681173452f812011da706 /sql/sql_view.cc | |
parent | 40d98edd220d1ec7a317d3c1cbcbf58c5748388b (diff) | |
download | mariadb-git-cd055f0efe330ace1d4d83536f1cbbeb1c8e0ab9.tar.gz |
Backport of:
-------------------------------------------------------------------
revno: 2630.6.6
committer: Konstantin Osipov <konstantin@mysql.com>
branch nick: mysql-6.0-3726
timestamp: Tue 2008-05-27 16:15:44 +0400
message:
Implement code review fixes for WL#3726 "DDL locking for all
metadata objects": cleanup the code from share->mutex
acquisitions, which are now obsolete.
sql/ha_partition.cc:
Rename share->mutex to share->LOCK_ha_data. The mutex never
protected the entire share. The right way to protect a share
is to acquire an MDL lock.
sql/ha_partition.h:
Rename share->mutex to share->LOCK_ha_data.
sql/sql_base.cc:
Remove LOCK_table_share. Do not acquire share->mutex when
deleting a table share or incrementing its ref_count.
All these operations are and must continue to be protected by LOCK_open
and respective MDL locks.
sql/sql_view.cc:
Remove acquisition of share->mutex when incrementing share->ref_count.
sql/table.cc:
Simplify release_table_shar() by removing dead code related
to share->mutex from it.
sql/table.h:
Rename TABLE_SHARE::mutex to TABLE_SHARE::LOCK_ha_data
to better reflect its purpose.
storage/myisam/ha_myisam.cc:
Rename share->mutex to share->LOCK_ha_data.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 3dc5ca4e09c..55181a58e53 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1643,10 +1643,8 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode) if ((share= get_cached_table_share(view->db, view->table_name))) { DBUG_ASSERT(share->ref_count == 0); - pthread_mutex_lock(&share->mutex); share->ref_count++; share->version= 0; - pthread_mutex_unlock(&share->mutex); release_table_share(share); } query_cache_invalidate3(thd, view, 0); |