1. 29 May, 2018 8 commits
    • Otto Kekäläinen's avatar
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · a3539bbb
      Marko Mäkelä authored
      a3539bbb
    • Marko Mäkelä's avatar
      6f96ff72
    • Marko Mäkelä's avatar
      Add an end-marker to ease future merges · 7269c708
      Marko Mäkelä authored
      7269c708
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 18934fb5
      Marko Mäkelä authored
      18934fb5
    • Marko Mäkelä's avatar
      MDEV-16283 ALTER TABLE...DISCARD TABLESPACE still takes long on a large buffer pool · 6aa50bad
      Marko Mäkelä authored
      Also fixes MDEV-14727, MDEV-14491
      InnoDB: Error: Waited for 5 secs for hash index ref_count (1) to drop to 0
      by replacing the flawed wait logic in dict_index_remove_from_cache_low().
      
      On DISCARD TABLESPACE, there is no need to drop the adaptive hash index.
      We must drop it on IMPORT TABLESPACE, and eventually on DROP TABLE or
      DROP INDEX. As long as the dict_index_t object remains in the cache
      and the table remains inaccessible, the adaptive hash index entries
      to orphaned pages would not do any harm. They would be dropped when
      buffer pool pages are reused for something else.
      
      btr_search_drop_page_hash_when_freed(), buf_LRU_drop_page_hash_batch():
      Remove the parameter zip_size, and pass 0 to buf_page_get_gen().
      
      buf_page_get_gen(): Ignore zip_size if mode==BUF_PEEK_IF_IN_POOL.
      
      buf_LRU_drop_page_hash_for_tablespace(): Drop the adaptive hash index
      even if the tablespace is inaccessible.
      
      buf_LRU_drop_page_hash_for_tablespace(): New global function, to drop
      the adaptive hash index.
      
      buf_LRU_flush_or_remove_pages(), fil_delete_tablespace():
      Remove the parameter drop_ahi.
      
      dict_index_remove_from_cache_low(): Actively drop the adaptive hash index
      if entries exist. This should prevent InnoDB hangs on DROP TABLE or
      DROP INDEX.
      
      row_import_for_mysql(): Drop any adaptive hash index entries for the table.
      
      row_drop_table_for_mysql(): Drop any adaptive hash index for the table,
      except if the table resides in the system tablespace. (DISCARD TABLESPACE
      does not apply to the system tablespace, and we do no want to drop the
      adaptive hash index for other tables than the one that is being dropped.)
      
      row_truncate_table_for_mysql(): Drop any adaptive hash index entries for
      the table, except if the table resides in the system tablespace.
      6aa50bad
    • Marko Mäkelä's avatar
      Fix type mismatch · b7985a45
      Marko Mäkelä authored
      b7985a45
    • Marko Mäkelä's avatar
      MDEV-14589 InnoDB should not lock a delete-marked record · 35a9c90f
      Marko Mäkelä authored
      When the transaction isolation level is SERIALIZABLE, or when
      a locking read is performed in the REPEATABLE READ isolation level,
      InnoDB must lock delete-marked records in order to prevent another
      transaction from inserting something.
      
      However, at READ UNCOMMITTED or READ COMMITTED isolation level or
      when the parameter innodb_locks_unsafe_for_binlog is set, the
      repeatability of the reads does not matter, and there is no need
      to lock any records.
      
      row_search_for_mysql(): Skip locks on delete-marked committed records
      upfront, instead of invoking row_unlock_for_mysql() afterwards.
      The unlocking never worked for secondary index records.
      35a9c90f
  2. 28 May, 2018 9 commits
  3. 27 May, 2018 4 commits
  4. 26 May, 2018 11 commits
  5. 25 May, 2018 4 commits
    • Sergei Golubchik's avatar
      embedded use-after-free ASAN error · 9e22cae1
      Sergei Golubchik authored
      Close MYSQL (and destroy THD) in the same thread where it was used,
      because THD embeds MDL_context, that owns some LF_PINS, that remember
      a pointer to my_thread_var->stack_ends_here.
      9e22cae1
    • Andrei Elkin's avatar
      MDEV-13727 top-level query timestamp reset at stored func/trigger internal statements · 3bbc30c7
      Andrei Elkin authored
      Being executed under slow_log is ON the test revealed a "side-effect"
      in MDEV-8305 implementation which inadvertently made the trigger or
      stored function statements to reset the top-level query's
      THD::start_time et al. (Details of the test failure analysis are footnoted).
      Unlike the SP case the SF and Trigger's internal statement should not
      do that.
      
      Fixed with revising the MDEV-8305 decision to backup/reset/restore
      the session timestamp inside sp_instr_stmt::execute(). The timestamp
      actually remains reset in the SP case by its caller per statement basis by ever
      existing logics.
      
      Timestamps related tests are extended to cover the trigger and stored function case.
      
      Note, commit 3395ab73 is reverted as its struct QUERY_START_TIME_INFO
      declaration is not in use anymore after this patch.
      
      Footnote:
      --------
      Specifically to the failing test, a query on the master was logged
      okay with a timestamp of the query's top-level statement but its post
      update trigger managed to compute one more (later) timestamp which got
      inserted into another table. The latter table master-vs-slave
      no fractional part timestamp discrepancy became evident
      thanks to different execution time of the trigger combined with the
      fact of the logged with micro-second fractional part master timestamp
      was truncated on the slave. On master when the fractional part was
      close to 1 the trigger execution added up its own latency to overflow
      to next second value. That's how the master timestamp surprisingly
      turned out to bigger than the slave's one.
      3bbc30c7
    • Marko Mäkelä's avatar
      Make a test independent of VERSION · 83ec8c88
      Marko Mäkelä authored
      83ec8c88
    • Daniel Bartholomew's avatar
      bump the VERSION · c86ea540
      Daniel Bartholomew authored
      c86ea540
  6. 24 May, 2018 4 commits