• Konstantin Osipov's avatar
    Backport of: · b90ce2eb
    Konstantin Osipov authored
    ------------------------------------------------------------
    revno: 2630.4.20
    committer: Dmitry Lenev <dlenev@mysql.com>
    branch nick: mysql-6.0-3726-w2
    timestamp: Wed 2008-06-04 16:27:06 +0400
    message:
      WL#3726 "DDL locking for all metadata objects"
    
      After review fixes in progress.
    
      Got rid of TABLE_LIST::mdl_upgradable member and related functions
      by using special flag which to be passed to open_table() which
      asks it to take upgradable metadata lock on table being opened.
    
    
    sql/mysql_priv.h:
      Added one more argument to open_n_lock_single_table() call to be
      able to pass flags to open_table() and mysql_lock_tables() called
      by it.
      Added new flag for controlling open_table() behavior asks it to
      take upgradable metadata locks on tables open for write.
    sql/sql_base.cc:
      Added new flag for controlling open_table() behavior asks it to
      take upgradable metadata locks on tables open for write.
      This allowed us to get rid of TABLE_LIST::mdl_upgradable member.
      Added one more argument to open_n_lock_single_table() call to be
      able to pass flags to open_table() and mysql_lock_tables() called
      by it.
    sql/sql_insert.cc:
      Added one more argument to open_n_lock_single_table() call to be
      able to pass flags to open_table() and mysql_lock_tables() called
      by it.
    sql/sql_parse.cc:
      Got rid of TABLE_LIST::mdl_upgradable member by using special flag
      which to be passed to open_table() which asks it to take
      upgradable metadata lock on table being opened.  As result also
      got rid of adjust_mdl_locks_upgradability() function.
    sql/sql_table.cc:
      Got rid of TABLE_LIST::mdl_upgradable member and related functions
      by using special flag which to be passed to open_table() which
      asks it to take upgradable metadata lock on table being opened.
    sql/sql_view.cc:
      Got rid of TABLE_LIST::mdl_upgradable member and related functions
      by using special flag which to be passed to open_table() which
      asks it to take upgradable metadata lock on table being opened.
    sql/table.h:
      Got rid of TABLE_LIST::mdl_upgradable member and related functions
      by using special flag which to be passed to open_table() which
      asks it to take upgradable metadata lock on table being opened.
    b90ce2eb
sql_view.cc 59.2 KB