1. 20 Jan, 2018 8 commits
    • Sergey Vojtovich's avatar
      MDEV-14756 - Remove trx_sys_t::rw_trx_list · a447980f
      Sergey Vojtovich authored
      Let lock_print_info_all_transactions() iterate rw_trx_hash instead of
      rw_trx_list.
      
      When printing info of locks for transactions, InnoDB monitor doesn't
      attempt to read relevant page from disk anymore. The code was prone
      to race conditions.
      
      Note that TrxListIterator didn't work as advertised: it iterated
      rw_trx_list only.
      a447980f
    • Sergey Vojtovich's avatar
      MDEV-14756 - Remove trx_sys_t::rw_trx_list · 886af392
      Sergey Vojtovich authored
      Let trx_rollback_recovered() iterate rw_trx_hash instead of rw_trx_list.
      886af392
    • Sergey Vojtovich's avatar
      MDEV-14756 - Remove trx_sys_t::rw_trx_list · 02270b44
      Sergey Vojtovich authored
      Let lock_validate_table_locks(), lock_rec_other_trx_holds_expl(),
      lock_table_locks_lookup(), trx_recover_for_mysql(), trx_get_trx_by_xid(),
      trx_roll_must_shutdown(), fetch_data_into_cache() iterate rw_trx_hash
      instead of rw_trx_list.
      02270b44
    • Sergey Vojtovich's avatar
      MDEV-14756 - Remove trx_sys_t::rw_trx_list · d8c0caad
      Sergey Vojtovich authored
      Removed trx_sys_validate_trx_list(): with rw_trx_hash elements are not
      required to be ordered by transaction id. Transaction state is now guarded
      by asserts in rw_trx_hash_t.
      d8c0caad
    • Sergey Vojtovich's avatar
      MDEV-14756 - Remove trx_sys_t::rw_trx_list · 900b0790
      Sergey Vojtovich authored
      Removed trx_sys_t::n_prepared_recovered_trx: never used.
      
      Removed trx_sys_t::n_prepared_trx: used only at shutdown, we can perfectly
      get this value from rw_trx_hash.
      900b0790
    • Sergey Vojtovich's avatar
      MDEV-14756 - Remove trx_sys_t::rw_trx_list · a0b385ea
      Sergey Vojtovich authored
      Determine minimum transaction id by iterating rw_trx_hash, not rw_trx_list.
      
      It is more expensive than previous implementation since it does linear
      search, especially if there're many concurrent transactions running. But in
      such case mutex is much bigger evil. And since it doesn't require
      trx_sys->mutex protection it scales better.
      
      For low concurrency performance difference is neglible.
      a0b385ea
    • Sergey Vojtovich's avatar
      MDEV-14756 - Remove trx_sys_t::rw_trx_list · 868c77df
      Sergey Vojtovich authored
      Replaced UT_LIST_GET_LEN(trx_sys->rw_trx_list) with
      trx_sys->rw_trx_hash.size().
      Moved freeing of trx objects at shutdown to rw_trx_hash destructor.
      Small clean-up in trx_rollback_recovered().
      868c77df
    • Sergey Vojtovich's avatar
      MDEV-14756 - Remove trx_sys_t::rw_trx_list · d09f1469
      Sergey Vojtovich authored
      Reduce divergence between trx_sys_t::rw_trx_hash and trx_sys_t::rw_trx_list
      by not adding recovered COMMITTED transactions to trx_sys_t::rw_trx_list.
      
      Such transactions are discarded immediately without creating trx object.
      
      This also required to split rollback and cleanup phases of recovery. To
      reflect these updates the following renames happened:
      trx_rollback_or_clean_all_recovered() -> trx_rollback_all_recovered()
      trx_rollback_or_clean_is_active -> trx_rollback_is_active
      trx_rollback_or_clean_recovered() -> trx_rollback_recovered()
      trx_cleanup_at_db_startup() -> trx_cleanup_recovered()
      
      Also removed a hack from lock_trx_release_locks(). Instead let recovery
      rollback thread to skip committed XA transactions.
      d09f1469
  2. 19 Jan, 2018 1 commit
  3. 18 Jan, 2018 2 commits
  4. 17 Jan, 2018 4 commits
    • Marko Mäkelä's avatar
      Merge bb-10.2-ext into 10.3 · 4ef2e430
      Marko Mäkelä authored
      4ef2e430
    • Marko Mäkelä's avatar
      Merge 10.2 into bb-10.2-ext · c6cd64f3
      Marko Mäkelä authored
      c6cd64f3
    • Marko Mäkelä's avatar
      Follow-up fix to MDEV-14585 Automatically remove #sql- tables in InnoDB dictionary during recovery · 656f66de
      Marko Mäkelä authored
      If InnoDB is killed while ALTER TABLE...ALGORITHM=COPY is in progress,
      after recovery there could be undo log records some records that were
      inserted into an intermediate copy of the table. Due to these undo log
      records, InnoDB would resurrect locks at recovery, and the intermediate
      table would be locked while we are trying to drop it. This would cause
      a call to row_rename_table_for_mysql(), either from
      row_mysql_drop_garbage_tables() or from the rollback of a RENAME
      operation that was part of the ALTER TABLE.
      
      row_rename_table_for_mysql(): Do not attempt to parse FOREIGN KEY
      constraints when renaming from #sql-something to #sql-something-else,
      because it does not make any sense.
      
      row_drop_table_for_mysql(): When deferring DROP TABLE due to locks,
      do not rename the table if its name already starts with the #sql-
      prefix, which is what row_mysql_drop_garbage_tables() uses.
      Previously, the too strict prefix #sql-ib was used, and some
      tables were renamed unnecessarily.
      656f66de
    • Marko Mäkelä's avatar
      Do not define unused function mark_blocks_free() · 04eef79b
      Marko Mäkelä authored
      Follow-up to commit 9ec19b9b
      04eef79b
  5. 16 Jan, 2018 25 commits