maria:bb-11.0-mdev30310-updated

Last commit made on 2022-12-28
Get this branch:
git clone -b bb-11.0-mdev30310-updated https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11.0-mdev30310-updated
Repository:
lp:maria

Recent commits

eea4a1a... by Sergey Petrunia

MDEV-30310: patch from Monty, a bit amended

8742b0f... by Monty <email address hidden>

Fixed wrong selectivity calculation in table_after_join_selectivity()

The old code counted selectivity double in case of queries like:
WHERE key_part1=1 and key_part2 < 100
if the optimizer would decide to use a REF access on key_part1.

The new code in best_access_path() that changes REF access to RANGE
if the RANGE key is longer makes this issue less likely to happen.

I was not able to create a test case for 11.0, however if one ports this
patch to a MariaDB version without the change of REF to RANGE, the
selectivity will be counted double.

184735d... by Monty <email address hidden>

Cache file->index_flags(index, 0, 1) in table->key_info[index].index_flags

The reason for this is that we call file->index_flags(index, 0, 1)
multiple times in best_access_patch()when optimizing a table.
For example, in InnoDB, the calls is not trivial (4 if's and 2 assignments)
Now the function is inlined and is just a memory reference.

Other things:
- handler::is_clustering_key() and pk_is_clustering_key() are now inline.
- Added TABLE::can_use_rowid_filter() to simplify some code.
- Test if we should use a rowid_filter only if can_use_rowid_filter() is
  true.
- Added TABLE::is_clustering_key() to avoid a memory reference.
- Simplify some code using the fact that HA_KEYREAD_ONLY is true implies
  that HA_CLUSTERED_INDEX is false.
- Added DBUG_ASSERT to TABLE::best_range_rowid_filter() to ensure we
  do not call it with a clustering key.
- Reorginized elements in struct st_key to get better memory alignment.
- Updated ha_innobase::index_flags() to not have
  HA_DO_RANGE_FILTER_PUSHDOWN for clustered index

61e8072... by Monty <email address hidden>

Updated some tests for --valgrind

- Increased timeout for binlog_mysqlbinlog_raw_flush.test.
  The old timeout was not enough when running with --valgrind
- Disabled ssl_timeout for --valgrind as it times out
- Disabled binlog_truncate_multi_engine for --valgrind as it does restarts

178db58... by Monty <email address hidden>

Fixed 'undefined variable' error in mtr

This could happen if mtr_grab_file() returned empty (happened to me)

543e5dd... by Sergey Petrunia

Make tests work with --view-protocol

6521c5e... by Sergey Petrunia

Stabilize rocksdb.rocksdb test.

cdd5972... by Sergey Petrunia

MDEV-21095: Make Optimizer Trace support Index Condition Pushdown

Fixes over previous patches: do tracing of attached conditions
close to where we generate them.

Fix the tracing code to print the right conditions.

723a178... by Rex Johnston

MDEV-21092,MDEV-21095,MDEV-29997: Optimizer Trace for index condition pushdown, partition pruning, exists-to-in

        Add Optimizer Tracing for:
        - Index Condition Pushdown
        - Partition Pruning
        - Exists-to-IN optimization

e8f2047... by Sergey Petrunia

Stabilize engines/iuds.type_bit_iuds test

Make sure the queries use the intended query plan