1. 31 May, 2023 2 commits
  2. 27 May, 2023 2 commits
    • Monty's avatar
      MDEV-31247 Assertion `c >= 0' failed in COST_MULT upon query with many joins · 66114194
      Monty authored
      Problem was an overflow when calculating number of join cache refills.
      66114194
    • Monty's avatar
      MDEV-31258 Assertion `cond_selectivity <= 1.000000001' upon range query · 209fed8e
      Monty authored
      This was caused of two minor issues:
      - get_quick_record_count() returned the number of rows for range with
        least cost, when it should have returned the minum number of rows
        for any range.
      - When changing REF to RANGE, we also changed records_out, which
        should not be done (number of records in the result will not
        change).
      
      The above change can cause a small change in row estimates where the
      optimizer chooses a clustered key with more rows than a range one
      secondary key (unlikely case).
      209fed8e
  3. 09 May, 2023 2 commits
    • Sergei Petrunia's avatar
      MDEV-31223: UBSan error: sql_select.h:969:7: runtime error: load of value... · 368dd22a
      Sergei Petrunia authored
      In Loose_scan_opt::save_to_position, initialize
      POSITION::firstmatch_with_join_buf.
      368dd22a
    • Sergei Petrunia's avatar
      MDEV-31022: SIGSEGV in maria_create from create_internal_tmp_table · b3edbf25
      Sergei Petrunia authored
      The code in create_internal_tmp_table() didn't take into account that
      now temporary (derived) tables may have multiple indexes:
      
      - one index due to duplicate removal
         = In this example created by conversion of big-IN(...) into subquery
         = this index might be converted into a "unique constraint" if the key
           length is too large.
      - one index added by derived_with_keys optimization.
      
      Make create_internal_tmp_table() handle multiple indexes.
      
      Before this patch, use of a unique constraint was indicated in
      TABLE_SHARE::uniques. This was ok as unique constraint was the only index
      in the table. Now it's no longer the case so TABLE_SHARE::uniques is removed
      and replaced with an in-memory-only flag HA_UNIQUE_HASH.
      
      This patch is based on Monty's patch.
      Co-Author: Monty <monty@mariadb.org>
      b3edbf25
  4. 03 May, 2023 5 commits
    • Monty's avatar
      63df43a0
    • Monty's avatar
      Moved events tests from main to suite/events · 78f684e5
      Monty authored
      This makes it easier to run test on just events.
      78f684e5
    • Monty's avatar
      Moved merge tests from main to suite/merge · ec820a38
      Monty authored
      This makes it easier to run test on just the MRG_MYISAM engine.
      
      Other things:
      - Renamed merge-big.test to flush_corruption.test as it does not
        have anything to do with merge tables.
      ec820a38
    • Monty's avatar
      MDEV-30786 SIGFPE in cost_group_min_max on EXP · 0099c2fc
      Monty authored
      The problem was that for merge tables without any underlaying tables the
      block size was 0, which the code could not handle.
      
      Fixed by ensuring that MERGE tables never have a block size of 0.
      Fixed also a wrong assumption of number of seeks needed to scan
      merge tables.
      0099c2fc
    • Monty's avatar
      MDEV-30812: Improve output cardinality estimates for hash join · 3bdc5542
      Monty authored
      Introduces @@optimizer_switch flag: hash_join_cardinality
      
      When this option is on, use EITS statistics to produce tighter bounds
      for hash join output cardinality.
      
      This patch is an extension / replacement to a similar patch in 10.6
      
      New features:
      - optimizer_switch hash_join_cardinality is on by default
      - records_out is set to fanout when HASH is used
      - Fixed bug in is_eits_usable: The function did not work with views
      3bdc5542
  5. 28 Apr, 2023 6 commits
  6. 27 Apr, 2023 13 commits
  7. 26 Apr, 2023 10 commits