maria:bb-10.4-mdev31240

Last commit made on 2023-05-11
Get this branch:
git clone -b bb-10.4-mdev31240 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-mdev31240
Repository:
lp:maria

Recent commits

6fd54af... by Sergey Petrunia

MDEV-31240, MDEV-31241: Crashes in subselects in choose_best_splitting after upgrade

In JOIN_TAB::choose_best_splitting(), take into account that
best_param_tables may contain OUTER_REF_TABLE_BIT (and no table
in join->positions[] has this bit set).

de703a2... by Oleksandr "Sanja" Byelkin

Merge branch '10.4' into 10.4.29 release

7e7e12e... by Oleg Smirnov

MDEV-30765 SHOW TABLES not working properly with lower_case_table_names=2

lower_case_table_names=2 means "table names and database names are
stored as declared, but they are compared in lowercase".
But names of objects in grants are stored in lowercase for any value
of lower_case_table_names. This caused an error when checking grants
for objects containing uppercase letters since table_hash_search()
didn't take into account lower_case_table_names value

8c6e314... by Daniel Bartholomew <email address hidden>

bump the VERSION

6544d88... by Igor Babaev

MDEV-31224 Crash with EXPLAIN EXTENDED for multi-table update of system table

EXPLAIN EXTENDED should always print the field item used in the left part
of an equality expression from the SET clause of an update statement as a
reference to table column.

Approved by Oleksandr Byelkin <email address hidden>

a09f661... by Igor Babaev

MDEV-31181 Crash with EXPLAIN EXTENDED for single-table DELETE using IN predicand

This bug affected EXPLAIN EXTENDED command for single-table DELETE that
used an IN subquery in its WHERE clause. A crash happened if the optimizer
chose to employ index_subquery or unique_subquery access when processing
such command.
The crash happened when the command tried to print the transformed query.
In the current code of 10.4 for single-table DELETE statements the output
of any explain command is produced after the join structures of all used
subqueries have been destroyed. JOIN::destroy() sets the field tab of the
JOIN_TAB structures created for subquery tables to NULL. As a result
subselect_indexsubquery_engine::print(), subselect_indexsubquery_engine()
cannot use this field to get the alias name of the joined table.

This patch suggests to use the field TABLE_LIST::TAB that can be accessed
from JOIN_TAB::tab_list to get the alias name of the joined table.

Approved by Oleksandr Byelkin <email address hidden>

84b9fc2... by Monty <email address hidden>

Fixed wrong test cases (embedded and ASAN)

- main.selectivity failed because one test produced different result with
  embedded (missing feature). Fixed by moving the failing part to
  selectivity_notembedded.
- Disabled maria.encrypt-no-key for embedded as embedded does not support
  encryption
- Moved test from join_cache to join_cache_notasan that tried to alloc()
  a buffer bigger than available memory.

c874d5c... by Monty <email address hidden>

Added missing test file

e74390d... by Monty <email address hidden>

Cleanup of sql_join_cache code (no logic changes)

- Remove virtual from get_min_join_buffer_size() and
  get_max_join_buffer_size().
- Avoid some calls to get_min_buffer_size()
- Simply cache usage in get_..._join_buffer_size()
- Simplify get_max_join_buffer_size() when using optimize_buff_size
- Reindented some long comments

Reviewer: Sergei Petrunia <email address hidden>

5fd46be... by Monty <email address hidden>

Fixed calculation of JOIN_CACHE::max_records

The old code did set max_records to either number_of_rows
(partial_join_cardinality) or memory size (join_buffer_space_limit)
which did not make sense.

Fixed by setting max_records to number of rows that fits into
join_buffer_size.

Other things:
- Initialize buffer cache values in JOIN_CACHE constructors (safety)

Reviewer: Sergei Petrunia <email address hidden>