• Konstantin Osipov's avatar
    Backport of: · b58e7956
    Konstantin Osipov authored
    ------------------------------------------------------------
    revno: 2630.4.13
    committer: Dmitry Lenev <dlenev@mysql.com>
    branch nick: mysql-6.0-3726-w
    timestamp: Wed 2008-05-28 12:07:30 +0400
    message:
      WL#3726 "DDL locking for all metadata objects".
    
      After review fixes in progress.
    
      Get rid of remove_table_from_cache() function since it was
      doing two things at once -- waiting while no one uses particular
      table (now job of metadata locking) and removing TABLE/TABLE_SHARE
      instances from table definition cache (now job of
      expel_table_from_cache()).
    
    
    
    sql/mysql_priv.h:
      Got rid of remove_table_from_cache() function. Now one
              should use exclusive metadata lock for waiting until all
              other connections will stop using particular table and
              use expel_table_from_cache() for removing table instances
              and table share from table definition cache.
              Removed unused mysql_wait_completed_table() function.
    sql/sql_base.cc:
      Got rid of remove_table_from_cache() function. Now one
      should use exclusive metadata lock for waiting until all
      other connections will stop using particular table and
      use expel_table_from_cache() for removing table instances
      and table share from table definition cache.
              Removed unused mysql_wait_completed_table() function.
    sql/sql_table.cc:
      Get rid of two last places where we use remove_table_from_cache()
      by using wait_while_table_is_used() (which uses metadata locks)
      and close_cached_tables() instead.
    b58e7956
sql_base.cc 281 KB