1. 05 Nov, 2021 2 commits
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.7 · 2b551edb
      Marko Mäkelä authored
      2b551edb
    • Marko Mäkelä's avatar
      MDEV-26826 fixup: ROW_FORMAT=COMPRESSED may corrupt buf_pool.page_hash · 9b967c4c
      Marko Mäkelä authored
      In commit c091a0bc we removed
      the use of the HASH_ macros for inserting into
      buf_pool.page_hash, or accessing buf_page_t::hash.
      
      However, the binary buddy allocator for block->page.zip.data would
      still use the HASH_ macros. HASH_INSERT and not HASH_DELETE would reset
      the next-block pointer to the null pointer. Our replacement of
      HASH_DELETE() will reset the next-block pointer, and the replacement of
      HASH_INSERT() assumes that the pointer is the null pointer.
      
      buf_LRU_block_free_non_file_page(): Assert that the next-block pointer
      is the null pointer.
      
      buf_buddy_block_free(): Reset the pointer before invoking
      buf_LRU_block_free_non_file_page(). Without this, the added
      assertion would fail in the test encryption.innochecksum.
      9b967c4c
  2. 04 Nov, 2021 5 commits
  3. 03 Nov, 2021 6 commits
  4. 02 Nov, 2021 12 commits
  5. 01 Nov, 2021 1 commit
  6. 31 Oct, 2021 1 commit
  7. 30 Oct, 2021 4 commits
  8. 29 Oct, 2021 9 commits
    • Sergei Golubchik's avatar
      columnstore · 960b4870
      Sergei Golubchik authored
      960b4870
    • sjaakola's avatar
      MDEV-23328 Server hang due to Galera lock conflict resolution · ef2dbb8d
      sjaakola authored
      Mutex order violation when wsrep bf thread kills a conflicting trx,
      the stack is
      
                wsrep_thd_LOCK()
                wsrep_kill_victim()
                lock_rec_other_has_conflicting()
                lock_clust_rec_read_check_and_lock()
                row_search_mvcc()
                ha_innobase::index_read()
                ha_innobase::rnd_pos()
                handler::ha_rnd_pos()
                handler::rnd_pos_by_record()
                handler::ha_rnd_pos_by_record()
                Rows_log_event::find_row()
                Update_rows_log_event::do_exec_row()
                Rows_log_event::do_apply_event()
                Log_event::apply_event()
                wsrep_apply_events()
      
      and mutexes are taken in the order
      
                lock_sys->mutex -> victim_trx->mutex -> victim_thread->LOCK_thd_data
      
      When a normal KILL statement is executed, the stack is
      
                innobase_kill_query()
                kill_handlerton()
                plugin_foreach_with_mask()
                ha_kill_query()
                THD::awake()
                kill_one_thread()
      
              and mutexes are
      
                victim_thread->LOCK_thd_data -> lock_sys->mutex -> victim_trx->mutex
      
      This patch is the plan D variant for fixing potetial mutex locking
      order exercised by BF aborting and KILL command execution.
      
      In this approach, KILL command is replicated as TOI operation.
      This guarantees total isolation for the KILL command execution
      in the first node: there is no concurrent replication applying
      and no concurrent DDL executing. Therefore there is no risk of
      BF aborting to happen in parallel with KILL command execution
      either. Potential mutex deadlocks between the different mutex
      access paths with KILL command execution and BF aborting cannot
      therefore happen.
      
      TOI replication is used, in this approach,  purely as means
      to provide isolated KILL command execution in the first node.
      KILL command should not (and must not) be applied in secondary
      nodes. In this patch, we make this sure by skipping KILL
      execution in secondary nodes, in applying phase, where we
      bail out if applier thread is trying to execute KILL command.
      This is effective, but skipping the applying of KILL command
      could happen much earlier as well.
      
      This also fixed unprotected calls to wsrep_thd_abort
      that will use wsrep_abort_transaction. This is fixed
      by holding THD::LOCK_thd_data while we abort transaction.
      Reviewed-by: default avatarJan Lindström <jan.lindstrom@mariadb.com>
      ef2dbb8d
    • Jan Lindström's avatar
      MDEV-25114: Crash: WSREP: invalid state ROLLED_BACK (FATAL) · d5bc0579
      Jan Lindström authored
      Revert "MDEV-23328 Server hang due to Galera lock conflict resolution"
      
      This reverts commit eac8341d.
      d5bc0579
    • Oleksandr Byelkin's avatar
      Merge branch '10.3' into 10.4 · 5900f3a7
      Oleksandr Byelkin authored
      5900f3a7
    • Oleksandr Byelkin's avatar
      Merge branch '10.2' into 10.3 · 6953af36
      Oleksandr Byelkin authored
      6953af36
    • Alexander Barkov's avatar
      MDEV-26732 Assertion `0' failed in Item::val_native · da4479ef
      Alexander Barkov authored
      add a test case
      da4479ef
    • Alexander Barkov's avatar
      6bf5a3be
    • Alexander Barkov's avatar
      MDEV-26742 Assertion `field->type_handler() == this' failed in... · 4300f502
      Alexander Barkov authored
      MDEV-26742 Assertion `field->type_handler() == this' failed in FixedBinTypeBundle<NATIVE_LEN, MAX_CHAR_LEN>::Type_handler_fbt::stored_field_cmp_to_item
      
      The bug was fixed in 10.5 using INET6 specific tests.
      
      This bugs adds only UUID specific tests (no code changes).
      4300f502
    • Alexander Barkov's avatar
      MDEV-26664 Store UUIDs in a more efficient manner · b9f19f7e
      Alexander Barkov authored
      UUID values
      
        llllllll-mmmm-Vhhh-vsss-nnnnnnnnnnnn
      
      are now stored as
      
        nnnnnnnnnnnn-vsss-Vhhh-mmmm-llllllll
      
      inside the record:
      
      - the groups (segments separated by dash) are reordered right-to-left.
      - the bytes inside the groups are not reordered (stored as before,
        in big-endian format).
      
      This provides a better sorting order: the earlier UUID was generated,
      the higher it appears in the ORDER BY output.
      
      Also, this change enables a good key prefix compression,
      because the constant part is now in the beginning, while
      the non-constant part (the timestamp) is in the end.
      b9f19f7e