An error occurred fetching the project authors.
  1. 17 Oct, 2019 1 commit
    • Marko Mäkelä's avatar
      MDEV-20852 BtrBulk is unnecessarily holding dict_index_t::lock · fa32d28f
      Marko Mäkelä authored
      The BtrBulk class, which was introduced in MySQL 5.7, is by design
      the exclusive writer to an index. It is therefore unnecessary to
      acquire the dict_index_t::lock in that code.
      
      Holding the dict_index_t::lock would unnecessarily block other threads
      (SQL connections and the InnoDB purge threads) from buffering concurrent
      modifications to being-created secondary indexes.
      
      This fix is motivated by a change in MySQL 5.7.28:
      Bug #29008298 MYSQLD CRASHES ITSELF WHEN CREATING INDEX
      mysql/mysql-server@f9fb96c20f9d190f654e7aa2387255bf80fd6e45
      
      PageBulk::init(), PageBulk::latch(): Never acquire m_index->lock.
      
      PageBulk::storeExt(): Remove some pointer indirection, and improve
      a debug assertion that seems to prove that some code is redundant.
      
      BtrBulk::pageCommit(): Assert that m_index->lock is not being held.
      
      btr_blob_log_check_t: Do not acquire m_index->lock if
      m_op == BTR_STORE_INSERT_BULK. Add UNIV_UNLIKELY hints around
      that condition.
      
      btr_store_big_rec_extern_fields(): Allow index->lock not to be held
      while op == BTR_STORE_INSERT_BULK. Add UNIV_UNLIKELY hints around
      that condition.
      fa32d28f
  2. 29 Apr, 2019 1 commit
  3. 25 Apr, 2019 1 commit
    • Eugene Kosov's avatar
      MDEV-19231 make DB_SUCCESS equal to 0 · 6c5c1f0b
      Eugene Kosov authored
      It's a micro optimization. On most platforms CPUs has instructions to
      compare with 0 fast. DB_SUCCESS is the most popular outcome of functions
      and this patch optimized code like (err == DB_SUCCESS)
      
      BtrBulk::finish(): bogus assertion fixed
      
      fil_node_t::read_page0(): corrected usage of os_file_read()
      
      que_eval_sql(): bugus assertion removed. Apparently it checked that
      the field was assigned after having been zero-initialized at
      object creation.
      
      It turns out that the return type of os_file_read_func() was changed
      in mysql/mysql-server@98909cefbc37e54efc6452c7e95bccbf64ac9213 (MySQL 5.7)
      from ibool to dberr_t. The reviewer (if there was any) failed to
      point out that because of future merges, it could be a bad idea to
      change the return type of a function without changing the function name.
      
      This change was applied to MariaDB 10.2.2 in
      commit 2e814d47 but the
      MariaDB-specific code was not fully adjusted accordingly,
      e.g. in fil_node_open_file(). Essentially, code like
      !os_file_read(...) became dead code in MariaDB and later
      in Mariabackup 10.2, and we could be dealing with an uninitialized
      buffer after a failed page read.
      6c5c1f0b
  4. 08 Apr, 2019 1 commit
    • Marko Mäkelä's avatar
      MDEV-8139: Clean up the freeing of B-tree pages · 4b822111
      Marko Mäkelä authored
      btr_page_free(): Renamed from btr_page_free_low().
      If scrubbing is enabled, zero out the page with proper redo logging.
      Only pass ahi=true to fseg_free_page() if the page is actually indexed.
      
      fil_space_t::modify_check(): Renamed from fsp_space_modify_check().
      
      fsp_init_file_page(): Define inline.
      4b822111
  5. 06 Apr, 2019 1 commit
  6. 14 Jan, 2019 1 commit
  7. 26 Jul, 2018 6 commits
    • Marko Mäkelä's avatar
      MDEV-16809 Allow full redo logging for ALTER TABLE · 0f90728b
      Marko Mäkelä authored
      Introduce the configuration option innodb_log_optimize_ddl
      for controlling whether native index creation or table-rebuild
      in InnoDB should keep optimizing the redo log
      (and writing MLOG_INDEX_LOAD records to ensure that
      concurrent backup would fail).
      
      By default, we have innodb_log_optimize_ddl=ON, that is,
      the default behaviour that was introduced in MariaDB 10.2.2
      (with the merge of InnoDB from MySQL 5.7) will be unchanged.
      
      BtrBulk::m_trx: Replaces m_trx_id. We must be able to check for
      KILL QUERY even if !m_flush_observer (innodb_log_optimize_ddl=OFF).
      
      page_cur_insert_rec_write_log(): Declare globally, so that this
      can be called from PageBulk::insert().
      
      row_merge_insert_index_tuples(): Remove the unused parameter trx_id.
      
      row_merge_build_indexes(): Enable or disable redo logging based on
      the innodb_log_optimize_ddl parameter.
      
      PageBulk::init(), PageBulk::insert(), PageBulk::finish(): Write
      redo log records if needed. For ROW_FORMAT=COMPRESSED, redo log
      will be written in PageBulk::compress() unless we called
      m_mtr.set_log_mode(MTR_LOG_NO_REDO).
      0f90728b
    • Marko Mäkelä's avatar
      32eb5823
    • Marko Mäkelä's avatar
      Remove unused BtrBulk::m_heap · 4a456eac
      Marko Mäkelä authored
      4a456eac
    • Marko Mäkelä's avatar
      a3b22147
    • Marko Mäkelä's avatar
      PageBulk: Remove dead code · 172199b8
      Marko Mäkelä authored
      Native ALTER TABLE is never invoked on temporary tables.
      172199b8
    • Marko Mäkelä's avatar
      Remove mtr_set_flush_observer() · 7f548943
      Marko Mäkelä authored
      7f548943
  8. 11 Oct, 2017 1 commit
  9. 20 Sep, 2017 1 commit
    • Marko Mäkelä's avatar
      Add the parameter bool leaf to rec_get_offsets() · 48192f96
      Marko Mäkelä authored
      This should affect debug builds only. Debug builds will check that
      the status bits of ROW_FORMAT!=REDUNDANT records match the is_leaf
      parameter.
      
      The only observable change to non-debug should be the addition of
      the is_leaf parameter to the function rec_copy_prefix_to_dtuple(),
      and the removal of some calls to update the adaptive hash index
      (it is only built for the leaf pages).
      
      This change should have been made in MySQL 5.0.3, instead of
      introducing the status flags in the ROW_FORMAT=COMPACT record header.
      48192f96
  10. 16 Jun, 2017 1 commit
    • Marko Mäkelä's avatar
      Remove trx_t::has_search_latch and simplify debug code · 50faeda4
      Marko Mäkelä authored
      When the btr_search_latch was split into an array of latches
      in MySQL 5.7.8 as part of the Oracle Bug#20985298 fix, the "caching"
      of the latch across storage engine API calls was removed, and
      the field trx->has_search_latch would only be set during a short
      time frame in the execution of row_search_mvcc(), which was
      formerly called row_search_for_mysql().
      
      This means that the column
      INFORMATION_SCHEMA.INNODB_TRX.TRX_ADAPTIVE_HASH_LATCHED will always
      report 0. That column cannot be removed in MariaDB 10.2, but it
      can be removed in future releases.
      
      trx_t::has_search_latch: Remove.
      
      trx_assert_no_search_latch(): Remove.
      
      row_sel_try_search_shortcut_for_mysql(): Remove a redundant condition
      on trx->has_search_latch (it was always true).
      
      sync_check_iterate(): Make the parameter const.
      
      sync_check_functor_t: Make the operator() const, and remove result()
      and the virtual destructor. There is no need to have mutable state
      in the functors.
      
      sync_checker<bool>: Replaces dict_sync_check and btrsea_sync_check.
      
      sync_check: Replaces btrsea_sync_check.
      
      dict_sync_check: Instantiated from sync_checker.
      
      sync_allowed_latches: Use std::find() directly on the array.
      Remove the std::vector.
      
      TrxInInnoDB::enter(), TrxInInnoDB::exit(): Remove obviously redundant
      debug assertions on trx->in_depth, and use equality comparison against 0
      because it could be more efficient on some architectures.
      50faeda4
  11. 08 Sep, 2016 1 commit
    • Jan Lindström's avatar
      Merge InnoDB 5.7 from mysql-5.7.14. · fec844ac
      Jan Lindström authored
      Contains also:
             MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan)
             Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB
      
             MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
             enable tests that were fixed in MDEV-10549
      
             MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
             fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables
      fec844ac
  12. 02 Sep, 2016 1 commit
    • Jan Lindström's avatar
      Merge InnoDB 5.7 from mysql-5.7.9. · 2e814d47
      Jan Lindström authored
      Contains also
      
      MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7
      
      	The failure happened because 5.7 has changed the signature of
      	the bool handler::primary_key_is_clustered() const
      	virtual function ("const" was added). InnoDB was using the old
      	signature which caused the function not to be used.
      
      MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7
      
      	Fixed mutexing problem on lock_trx_handle_wait. Note that
      	rpl_parallel and rpl_optimistic_parallel tests still
      	fail.
      
      MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
        Reason: incorrect merge
      
      MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
        Reason: incorrect merge
      2e814d47