1. 11 Jan, 2018 1 commit
    • Sergey Vojtovich's avatar
      MDEV-14638 - Replace trx_sys_t::rw_trx_set with LF_HASH · 380069c2
      Sergey Vojtovich authored
      trx_sys_t::rw_trx_set is implemented as std::set, which does a few quite
      expensive operations under trx_sys_t::mutex protection: e.g. malloc/free
      when adding/removing elements. Traversing b-tree is not that cheap either.
      
      This has negative scalability impact, which is especially visible when running
      oltp_update_index.lua benchmark on a ramdisk.
      
      To reduce trx_sys_t::mutex contention std::set is replaced with LF_HASH. None
      of LF_HASH operations require trx_sys_t::mutex (nor any other global mutex)
      protection.
      
      Another interesting issue observed with std::set is reproducible ~2% performance
      decline after benchmark is ran for ~60 seconds. With LF_HASH results are stable.
      
      All in all this patch optimises away one of three trx_sys->mutex locks per
      oltp_update_index.lua query. The other two critical sections became smaller.
      
      Relevant clean-ups:
      
      Replaced rw_trx_set iteration at startup with local set. The latter is needed
      because values inserted to rw_trx_list must be ordered by trx->id.
      
      Removed redundant conditions from trx_reference(): it is (and even was) never
      called with transactions that have trx->state == TRX_STATE_COMMITTED_IN_MEMORY.
      do_ref_count doesn't (and probably even didn't) make any sense: now it is called
      only when reference counter increment is actually requested.
      
      Moved condition out of mutex in trx_erase_lists().
      
      trx_rw_is_active(), trx_rw_is_active_low() and trx_get_rw_trx_by_id() were
      greatly simplified and replaced by appropriate trx_rw_hash_t methods.
      
      Compared to rw_trx_set, rw_trx_hash holds transactions only in PREPARED or
      ACTIVE states. Transactions in COMMITTED state were required to be found
      at InnoDB startup only. They are now looked up in the local set.
      
      Removed unused trx_assert_recovered().
      
      Removed unused innobase_get_trx() declaration.
      
      Removed rather semantically incorrect trx_sys_rw_trx_add().
      
      Moved information printout from trx_sys_init_at_db_start() to
      trx_lists_init_at_db_start().
      380069c2
  2. 10 Jan, 2018 1 commit
    • Monty's avatar
      MDEV-14822 binlog.binlog_killed fails with wrong result · 1a62c8a3
      Monty authored
      Problem was timing between the thread that was killed and reading the
      binary log.
      
      Updated the test to wait until the killed thread was properly terminated
      before checking what's in the binary log.
      
      To make check safe, I changed "threads_connected" to be updated after
      thd::cleanup() is done, to ensure that all binary logs updates are done
      before the variable is changed.  This was mainly done to get the
      test deterministic and have now other real influence in how the server
      works.
      1a62c8a3
  3. 09 Jan, 2018 3 commits
  4. 08 Jan, 2018 1 commit
  5. 07 Jan, 2018 2 commits
  6. 06 Jan, 2018 1 commit
  7. 05 Jan, 2018 11 commits
  8. 04 Jan, 2018 11 commits
    • Marko Mäkelä's avatar
      Merge branch 10.1 into 10.2 · c8e63644
      Marko Mäkelä authored
      c8e63644
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 21470de1
      Marko Mäkelä authored
      21470de1
    • Marko Mäkelä's avatar
      4496fd71
    • Marko Mäkelä's avatar
      MDEV-14057 InnoDB GIS tests fail · 8dc77a72
      Marko Mäkelä authored
      Fix and enable some of the tests; some remain disabled.
      
      The tests innodb_gis.rtree_old and innodb_gis.row_format
      duplicated some versions of the test main.gis-rtree.
      Instead of duplicating, source that test, in a new test
      innodb_gis.innodb_gis_rtree.
      
      Introduce innodb_row_format.combinations. Due to this,
      ROW_FORMAT=COMPRESSED will not be covered in some tests
      where it is covered in MySQL 5.7.
      8dc77a72
    • Marko Mäkelä's avatar
      MDEV-14058 InnoDB Assertion failure !leaf on rem0rec.cc line 566 on test innodb_gis.rtree_recovery · 218dbf68
      Marko Mäkelä authored
      The function rtr_update_mbr_field_in_place() is generating
      MLOG_REC_UPDATE_IN_PLACE or MLOG_COMP_REC_UPDATE_IN_PLACE records
      on non-leaf pages, even though MLOG_WRITE_STRING would perfectly
      suffice for updating a fixed-length data field.
      
      btr_cur_parse_update_in_place(): If flags==7, the record may be
      from rtr_update_mbr_field_in_place(), and we must check if the
      page is a leaf page. Otherwise, assume that it is.
      
      btr_cur_update_in_place(): Assert that the page is a leaf page.
      218dbf68
    • Marko Mäkelä's avatar
      Relax a bogus debug assertion · c9ad134e
      Marko Mäkelä authored
      While insert direction makes no sense for SPATIAL INDEX (R-tree),
      the field is apparently being used (and basically garbage).
      Relax the debug assertion that was added in MDEV-11369.
      c9ad134e
    • Daniel Bartholomew's avatar
      bump the VERSION · 0f253d3e
      Daniel Bartholomew authored
      0f253d3e
    • Monty's avatar
      Fixed wrong arguments to printf and related functions · 5e0b13d1
      Monty authored
      Other things, mainly to get
      create_mysqld_error_find_printf_error tool to work:
      
      - Added protection to not include mysqld_error.h twice
      - Include "unireg.h" instead of "mysqld_error.h" in server
      - Added protection if ER_XX messages are already defined
      - Removed wrong calls to my_error(ER_OUTOFMEMORY) as
        my_malloc() and my_alloc will do this automatically
      - Added missing %s to ER_DUP_QUERY_NAME
      - Removed old and wrong calls to my_strerror() when using
        MY_ERROR_ON_RENAME (wrong merge)
      - Fixed deadlock error message from Galera. Before the extra
        information given to ER_LOCK_DEADLOCK was missing because
        ER_LOCK_DEADLOCK doesn't provide any extra information.
      
      I kept #ifdef mysqld_error_find_printf_error_used in sql_acl.h
      to make it easy to do this kind of check again in the future
      5e0b13d1
    • Aleksey Midenkov's avatar
      Tests: detect table count for some encryption tests · 64afa5be
      Aleksey Midenkov authored
      debug_key_management
      encrypt_and_grep
      innodb_encryption
      
      If real table count is different from what is expected by the test, it
      just hangs on waiting to fulfill hardcoded number. And then exits with
      **failed** after 10 minutes of wait: quite unfriendly and hard to
      figure out what's going on.
      64afa5be
    • Sergei Petrunia's avatar
      Fix out-of-date comments. · c584a496
      Sergei Petrunia authored
      c584a496
    • Marko Mäkelä's avatar
      Merge bb-10.2-ext into 10.3 · 145ae15a
      Marko Mäkelä authored
      145ae15a
  9. 03 Jan, 2018 9 commits