1. 04 Apr, 2020 10 commits
  2. 03 Apr, 2020 17 commits
    • Aleksey Midenkov's avatar
      MDEV-21941 assertion cleanups · 40f4d8c6
      Aleksey Midenkov authored
      40f4d8c6
    • Aleksey Midenkov's avatar
      MDEV-21941 RENAME doesn't work for system time or period fields · 105b879d
      Aleksey Midenkov authored
      - Ignore system-invisible fields (as well as for setting default value);
      - Handle rename of system time and period fields.
      105b879d
    • Aleksey Midenkov's avatar
    • Aleksey Midenkov's avatar
      MDEV-21889 Typo fix: ER_KEY_DOES_NOT_EXISTS · 6fb3e83d
      Aleksey Midenkov authored
      libmariadb revision updated.
      6fb3e83d
    • Sergey Vojtovich's avatar
      Fix CentOS 6 and quantal build failures · d2c366c6
      Sergey Vojtovich authored
      d2c366c6
    • Marko Mäkelä's avatar
      MDEV-22139 fseg_free_page_low() fails to write FREE_PAGE record, breaking recovery · 1078a630
      Marko Mäkelä authored
      This bug was introduced by MDEV-15528
      commit a35b4ae8.
      
      In the case that I analyzed, we failed to apply
      an EXTENDED,INSERT_REUSE_REDUNDANT redo log record whose
      preceding record points to unallocated area after PAGE_HEAP_TOP.
      
      Had we properly written the FREE_PAGE record for the page,
      recovery would have processed it, because during the checkpoint,
      the log had been completely written past the LSN of the missed write.
      
      fseg_free_page_low(): Always invoke mtr_t::free().
      The other call is in fsp_free_page().
      1078a630
    • Daniel Black's avatar
    • Sergey Vojtovich's avatar
      Yet less TDC hash lookups · 4197014b
      Sergey Vojtovich authored
      Let auto repair table and truncate table routines flush TABLE_SHARE
      directly.
      
      Part of MDEV-17882 - Cleanup refresh version
      4197014b
    • Sergey Vojtovich's avatar
      Split tdc_remove_table() · 7a947614
      Sergey Vojtovich authored
      TDC_RT_REMOVE_ALL -> tdc_remove_table(). Some occurrences replaced with
      TDC_element::flush() (whenver TABLE_SHARE is available).
      
      TDC_RT_REMOVE_NOT_OWN[_KEEP_SHARE] -> TDC_element::flush(). These modes
      assume that current thread owns TABLE_SHARE reference, which means we can
      avoid hash lookup and flush unused TABLE instances directly.
      
      TDC_RT_REMOVE_UNUSED -> TDC_element::flush_unused(). Only [ab]used by
      mysql_admin_table() currently. Should be removed eventually.
      
      Part of MDEV-17882 - Cleanup refresh version
      7a947614
    • Sergey Vojtovich's avatar
      tc_remove_all_unused_tables() cleanup · 06fae758
      Sergey Vojtovich authored
      As tc_purge() never marks share flushed, let tdc_remove_table() do it
      directly.
      
      Part of MDEV-17882 - Cleanup refresh version
      06fae758
    • Sergey Vojtovich's avatar
      Proper locking for mysql.gtid_slave_pos truncation · 14e13856
      Sergey Vojtovich authored
      Aim of this patch is to remove tdc_remove_table(TDC_RT_REMOVE_UNUSED),
      which was mistakenly introduced by 055a3334.
      
      InnoDB allows only one open TABLE instance while performing table
      truncation. To fulfill this requirement:
      1. MDL_EXCLUSIVE has to be acquired to block concurrent threads from
         accessing given table
      2. cached TABLE instances have to be flushed
      3. another InnoDB requirement is such that TABLE_SHARE and remaining
         TABLE instance have to be invalidated and re-opened after truncation
      
      This goes more or less inline with what regular TRUNCATE TABLE does.
      
      Alternative solution would be handler::ha_delete_all_rows(), but InnoDB
      doesn't implement it unfortunately.
      
      Part of MDEV-17882 - Cleanup refresh version
      14e13856
    • Sergey Vojtovich's avatar
      Fixed close_cached_connection_tables() flushing · bfdd30d3
      Sergey Vojtovich authored
      Let DROP SERVER and ALTER SERVER perform fair affected tables flushing.
      That is acquire MDL_EXCLUSIVE and do tdc_remove_table(TDC_RT_REMOVE_ALL).
      
      Aim of this patch is elimination of another inconsistent use of
      TDC_RT_REMOVE_UNUSED. It fixes (to some extent) a problem described in the
      beginning of sql_server.cc, when close_cached_connection_tables()
      interferes with concurrent transaction.
      
      A better fix should probably introduce proper MDL locks for server
      objects?
      
      Part of MDEV-17882 - Cleanup refresh version
      bfdd30d3
    • Sergey Vojtovich's avatar
      Cleanup mysql_inplace_alter_table() · 54c03cb4
      Sergey Vojtovich authored
      Removed redundant tdc_remove_table(TDC_RT_REMOVE_ALL). Share was marked
      flushed by preceding wait_while_table_is_used() and eventually flushed by
      close_all_tables_for_name().
      
      Part of MDEV-17882 - Cleanup refresh version
      54c03cb4
    • Sergey Vojtovich's avatar
      Cleanup close_all_tables_for_name() · 02619ed7
      Sergey Vojtovich authored
      close_all_tables_for_name() is always preceded by
      wait_while_table_is_used(), which makes tdc_remove_table() redundant.
      The only (now fixed) exception was close_cached_tables().
      
      Part of MDEV-17882 - Cleanup refresh version
      02619ed7
    • Sergey Vojtovich's avatar
      Let "FTWRL <table_list>" use extra(HA_EXTRA_FLUSH) · e0743bd1
      Sergey Vojtovich authored
      Rather than flushing caches with tdc_remove_table(TDC_RT_REMOVE_UNUSED)
      flush them with extra(HA_EXTRA_FLUSH) instead. This goes inline with
      regular FTWRL.
      
      Part of MDEV-17882 - Cleanup refresh version
      e0743bd1
    • Marko Mäkelä's avatar
      MDEV-22126 Rename confusing constant mtr_t::OPT · 0870b75a
      Marko Mäkelä authored
      The template parameter mtr_t::OPT refers to optional, not optimized.
      Also the default parameter mtr_t::NORMAL refers to optimized writes.
      The name MAYBE_NOP would be more descriptive, conveying the idea
      that a write to a durable page might not actually have any effect.
      0870b75a
    • Marko Mäkelä's avatar
      MDEV-22108 Recovery fails with InnoDB: Malformed log record · 406ca20b
      Marko Mäkelä authored
      mtr_t::log_write(): Fix an off-by-one error.
      406ca20b
  3. 02 Apr, 2020 7 commits
  4. 01 Apr, 2020 5 commits
    • Marko Mäkelä's avatar
      MDEV-22107 Restore accidentally orphaned MTR_MEMO_MODIFY · b212f1da
      Marko Mäkelä authored
      In MDEV-12353, the calls to mtr_t::memo_modify_page()
      were accidentally removed along with
      mlog_open_and_write_index() and its callers.
      
      Let us resurrect the function to enable better debug checks.
      
      mtr_t::flag_modified(): Renamed from mtr_t::set_modified()
      and made private.
      
      mtr_t::set_modified(): Take const buf_block_t& as a parameter.
      
      In several mtr_t member functions, replace const buf_page_t&
      parameters with const buf_block_t&, so that we can pass the
      parameter to set_modified().
      
      mtr_t::modify(): Add a MTR_MEMO_MODIFY entry for a block that
      is guaranteed to be modified in the mini-transaction.
      b212f1da
    • Marko Mäkelä's avatar
      MDEV-12353: Fix a warning in RelWithDebInfo build · 587f3e0d
      Marko Mäkelä authored
      page_zip_clear_rec(): Explicitly initialize len
      in non-debug builds to avoid a warning about possibly
      invalid memset() length.
      587f3e0d
    • Marko Mäkelä's avatar
      Fix GCC 9.3.0 -Wstrict-aliasing · 51a9dd67
      Marko Mäkelä authored
      copy_keys_from_share(): Use reinterpret_cast instead of
      manipulating a reference to a type-punned pointer.
      
      This cleans up after the cleanup
      commit 0515577d.
      51a9dd67
    • Marko Mäkelä's avatar
      MDEV-22103 INNODB_ENCRYPTION_NUM_KEY_REQUESTS is missing from INFORMATION_SCHEMA.GLOBAL_STATUS · abaeeffb
      Marko Mäkelä authored
      In commit a5584b13
      some scrubbing-related status variables were removed along with
      the background scrubbing code.
      The status variable INNODB_ENCRYPTION_NUM_KEY_REQUESTS
      was inadvertently removed as part of that.
      
      innodb_status_variables[]: Restore "encryption_num_key_requests".
      
      We introduce the test innodb.innodb_status_variables
      in order to catch similar regressions in the future.
      abaeeffb
    • Marko Mäkelä's avatar
      MDEV-22102 Assertion w==OPT failed in trx_undo_header_create() · a1077ab2
      Marko Mäkelä authored
      Because InnoDB is not freeing undo pages to the normal
      free-page management, old undo log pages can be reused. Due to that,
      it is possible (but unlikely) that the fields TRX_UNDO_NEEDS_PURGE
      and TRX_UNDO_LOG_START relative to the free offset that is stored at
      TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_START already have the correct value.
      Hence, we must pass the mtr_t::OPT template parameter to silence the
      debug assertion.
      
      Other writes in trx_undo_header_create() that are using the default
      template parameter seem to be correct (the data fields should be
      guaranteed to change even in the event of reusing pages).
      a1077ab2
  5. 31 Mar, 2020 1 commit