• Konstantin Osipov's avatar
    Backport of: · 8ddb96e9
    Konstantin Osipov authored
    -------------------------------------------------------------------
    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.
    8ddb96e9
sql_base.cc 287 KB