• marko's avatar
    branches/zip: Fast index creation: Lock the data dictionary only after · acf84dfb
    marko authored
    acquiring the table lock.  The data dictionary should not be locked for
    long periods.  Before this change, in the worst case, the dictionary
    would be locked until the expiration of innodb_lock_wait_timeout.
    
    Virtually, transaction-level locks (locks on database objects, such
    as records and tables) have a latching order level of SYNC_USER_TRX_LOCK,
    which is above any InnoDB rw-locks or mutexes.  However, the latching
    order of SYNC_USER_TRX_LOCK is never checked, not even by UNIV_SYNC_DEBUG.
    
    ha_innobase::add_index(), ha_innobase::final_drop_index(): Invoke
    row_mysql_lock_data_dictionary(trx) only after row_merge_lock_table().
    acf84dfb
handler0alter.cc 28.6 KB