1. 19 May, 2023 3 commits
    • Vlad Lesin's avatar
      MDEV-31256 fil_node_open_file() releases fil_system.mutex allowing other... · 54227847
      Vlad Lesin authored
      MDEV-31256 fil_node_open_file() releases fil_system.mutex allowing other thread to open its file node
      
      There is room between mutex_exit(&fil_system.mutex) and
      mutex_enter(&fil_system.mutex) calls in fil_node_open_file(). During this
      room another thread can open the node, and ut_ad(!node->is_open())
      assertion in fil_node_open_file_low() can fail.
      
      The fix is not to open node if it was already opened by another thread.
      54227847
    • Marko Mäkelä's avatar
      Merge bb-10.5-release into 10.5 · 06d555a4
      Marko Mäkelä authored
      06d555a4
    • Marko Mäkelä's avatar
      MDEV-31234 InnoDB does not free UNDO after the fix of MDEV-30671 · e0084b9d
      Marko Mäkelä authored
      trx_purge_truncate_history(): Only call trx_purge_truncate_rseg_history()
      if the rollback segment is safe to process. This will avoid leaking undo
      log pages that are not yet ready to be processed. This fixes a regression
      that was introduced in
      commit 0de3be8c (MDEV-30671).
      
      trx_sys_t::any_active_transactions(): Separately count XA PREPARE
      transactions.
      
      srv_purge_should_exit(): Terminate slow shutdown if the history size
      does not change and XA PREPARE transactions exist in the system.
      This will avoid a hang of the test innodb.recovery_shutdown.
      
      Tested by: Matthias Leich
      e0084b9d
  2. 18 May, 2023 1 commit
    • Otto Kekäläinen's avatar
      Remove CODEOWNERS as obsolete · caeff135
      Otto Kekäläinen authored
      The CODEOWNERS was added almost 3 years ago but never saw any adoption.
      Only one person used it (me) to mark what files I maintain and for which
      I wish to review commits. No other maintainers or code paths were added,
      so clean it away for clarity.
      caeff135
  3. 12 May, 2023 2 commits
    • Marko Mäkelä's avatar
      MDEV-31254 InnoDB: Trying to read doublewrite buffer page · c9eff1a1
      Marko Mäkelä authored
      buf_read_page_low(): Remove an error message and a debug assertion
      that can be triggered when using innodb_page_size=4k and
      innodb_file_per_table=0. In that case, buf_read_ahead_linear()
      may be invoked on page 255, which is one less than the first
      page of the doublewrite buffer (256).
      c9eff1a1
    • Marko Mäkelä's avatar
      MDEV-31253 Freed data pages are not always being scrubbed · 477285c8
      Marko Mäkelä authored
      fil_space_t::flush_freed(): Renamed from buf_flush_freed_pages();
      this is a backport of aa458506 from 10.6.
      Invoke log_write_up_to() on last_freed_lsn, instead of avoiding
      the operation when the log has not yet been written.
      A more costly alternative would be that log_checkpoint() would invoke
      this function on every affected tablespace.
      477285c8
  4. 11 May, 2023 2 commits
  5. 10 May, 2023 1 commit
  6. 05 May, 2023 2 commits
    • Oleksandr Byelkin's avatar
      Merge branch '10.4' into 10.5 · b735ca47
      Oleksandr Byelkin authored
      b735ca47
    • Sergei Petrunia's avatar
      MDEV-31194: Server crash or assertion failure with join_cache_level=4 · 2594da7a
      Sergei Petrunia authored
      The problem, introduced in patch for MDEV-26301:
      
      When check_join_cache_usage() decides not to use join buffer, it must
      adjust the access method accordingly. For BNL-H joins this means switching
      from pseudo-"ref access"(with index=MAX_KEY) to some other access method.
      
      Failing to do this will cause assertions down the line when code that is
      not aware of BNL-H will try to initialize index use for ref access with
      index=MAX_KEY.
      
      The fix is to follow the regular code path to disable the join buffer for
      the join_tab ("goto no_join_cache") instead of just returning from
      check_join_cache_usage().
      2594da7a
  7. 04 May, 2023 7 commits
  8. 03 May, 2023 7 commits
  9. 02 May, 2023 11 commits
  10. 29 Apr, 2023 2 commits
  11. 28 Apr, 2023 2 commits
    • Angelique's avatar
      MDEV-30221: Move environmental macros to before master-slave · 1963a87b
      Angelique authored
      The fix was introduced, along with re-ordering to do other macros that check test environment capabilities before master/slave is set up.
      1963a87b
    • Sergei Petrunia's avatar
      MDEV-31067: selectivity_from_histogram >1.0 for a DOUBLE_PREC_HB histogram · 85cc8318
      Sergei Petrunia authored
      Variant #2.
      
      When Histogram::point_selectivity() sees that the point value of interest
      falls into one bucket, it tries to guess whether the bucket has many
      different (unpopular) values or a few popular values. (The number of
      rows is fixed, as it's a Height-balanced histogram).
      The basis for this guess is the "width" of the value range the bucket
      covers. Buckets covering wider value ranges are assumed to contain
      values with proportionally lower frequencies.
      
      This is just a [brave] guesswork. For a very narrow bucket, it may
      produce an estimate that's larger than total #rows in the bucket
      or even in the whole table.
      
      Remove the guesswork and replace it with basic logic: return
      either the per-table average selectivity of col=const, or selectivity
      of one bucket, whichever is lower.
      85cc8318