• Konstantin Osipov's avatar
    A post-review fix for type-aware metadata locks. · a9520bcf
    Konstantin Osipov authored
    DDL no longer aborts mysql_lock_tables(), and hence
    we no longer need to support need_reopen flag of this
    call. 
    Remove the flag, and all the code in the server
    that was responsible for handling the case when
    it was set. This allowed to simplify: 
    open_and_lock_tables_derived(), the delayed thread,
    multi-update.
    
    Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH,
    since we now only support this flag in open_table().
    
    Rename MYSQL_LOCK_PERF_SCHEMA to MYSQL_LOCK_LOG_TABLE,
    to avoid confusion.
    
    Move the wait for the global read lock for cases
    when we do updates in SELECT f1() or DO (UPDATE) to 
    open_table() from mysql_lock_tables(). When waiting
    for the read lock, we could raise need_reopen flag,
    which is no longer present in mysql_lock_tables().
    Since the block responsible for waiting for GRL
    was moved, MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK
    was renamed to MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK.
    a9520bcf
sql_table.cc 256 KB