maria:nn-10.5-merge

Last commit made on 2023-10-31
Get this branch:
git clone -b nn-10.5-merge https://git.launchpad.net/maria

Branch merges

Branch information

Name:
nn-10.5-merge
Repository:
lp:maria

Recent commits

3af9f88... by Oleksandr "Sanja" Byelkin

Make it compile with clang

861638a... by Oleksandr "Sanja" Byelkin

Merge branch 'bb-10.4-release' into nn-10.5-merge

c4143f9... by Oleksandr "Sanja" Byelkin

Make the test more stable

479f32f... by Oleksandr "Sanja" Byelkin

fix long test results

901339e... by Oleksandr "Sanja" Byelkin

Merge branch 'bb-10.4-release' into bb-10.5-release

86351f5... by Sergey Petrunia

MDEV-32351: Significant slowdown with outer joins: fix embedded.

For some reason, in embedded server, a command

let $a=`$query`

ignores local context. Make a workaround: use SET STATEMENT to set
debug_dbug in the same statement.

1cd8a5e... by Oleksandr "Sanja" Byelkin

Fix of Backport block-nl-join.r_unpack_time_ms.

9bf2e5e... by Sergey Petrunia

MDEV-32351: Significant slowdown with outer joins: Test coverage

Make ANALYZE FORMAT=JSON print block-nl-join.r_unpack_ops when
analyze_print_r_unpack_ops debug flag is set.

Then, add a testcase.

4ed5900... by Sergey Petrunia

ANALYZE FORMAT=JSON: Backport block-nl-join.r_unpack_time_ms from 11.0 +fix MDEV-30830.

Also fix it to work with hashed join (MDEV-30830).

Reviewed by: Monty <email address hidden>

954a6de... by Igor Babaev

MDEV-32351 Significant slowdown for query with many outer joins

This patch fixes a performance regression introduced in the patch for the
bug MDEV-21104. The performance regression could affect queries for which
join buffer was used for an outer join such that its on expression from
which a conjunctive condition depended only on outer tables can be
extracted. If the number of records in the join buffer for which this
condition was false greatly exceeded the number of other records the
slowdown could be significant.

If there is a conjunctive condition extracted from the ON expression
depending only on outer tables this condition is evaluated when interesting
fields of each survived record of outer tables are put into the join buffer.
Each such set of fields for any join operation is supplied with a match
flag field used to generate null complemented rows. If the result of the
evaluation of the condition is false the flag is set to MATCH_IMPOSSIBLE.
When looking in the join buffer for records matching a record of the
right operand of the outer join operation the records with such flags
are not needed to be unpacked into record buffers for evaluation of on
expressions.

The patch for MDEV-21104 fixing some problem of wrong results when
'not exists' optimization by mistake broke the code that allowed to
ignore records with the match flag set to MATCH_IMPOSSIBLE when looking
for matching records. As a result such records were unpacked for each
record of the right operand of the outer join operation. This caused
significant execution penalty in some cases.

One of the test cases added in the patch can be used only for demonstration
of the restored performance for the reported query. The second test case is
needed to demonstrate the validity of the fix.