maria:bb-11.1-mdev-27201

Last commit made on 2023-08-23
Get this branch:
git clone -b bb-11.1-mdev-27201 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11.1-mdev-27201
Repository:
lp:maria

Recent commits

b51bb29... by Oleg Smirnov

MDEV-27201 Refactoring and cleanup

Extract function mark_column_if_needed() from find_field_in_table_ref().
Fix Windows build errors

c7d985f... by Oleg Smirnov

MDEV-27201 Do not compute unused aggregate functions for derived tables and views

Disable the calculation of aggregate functions whose results are not used,
neither inside the derived table SQL nor outside, in the outer select.
For example, in the following case:
  SELECT sum_b
  FROM (SELECT a, sum(b) AS sum_b, max(c) AS max_c, min(d) AS min_d
        FROM t1
        GROUP BY a
        HAVING max_c > 10
       ) T
T.min_d is not used anywhere, thus there is no need to calculate the
aggregate function min(d).
This applies to both VIEWs and derived tables.

This commit discards setting all bits of read_set for temporary tables
to 1, which was done by default. That allows to determine
which fields of a view/derived table are not used in the outer query.
If some of those fields are aggregate functions (descendants from Item_sum)
there is no need to calculate them (given, of course, that those fields
are neither used inside the derived table/view - in HAVING or ORDER BY clauses).

To disable the calculation of unused aggregate functions they are removed
from JOIN::sum_funcs list and marked as eliminated. So the commit does not
change the item tree (items are left in place) but only disables
their calculation. Marking items as eliminated allows to later eliminate
whole derived tables/views in the corresponding optimization.

adc13e2... by Igor Babaev

MDEV-31150 Crash on 2nd execution of update using mergeable derived table

This bug caused crashes of the server on the second execution of update
statements that used mergeable derived tables. The crashes happened in
the function multi_update_check_table_access() when the code tried to
dereference the pointer stored in field TABLE_LIST::TABLE for a mergeable
derived table. The fact is this field is set to NULL after the first
execution of the query. At the same any action performed by the function
is actually not needed for derived tables.

Approved by Oleksandr Byelkin <email address hidden>

c6ac1e3... by Marko Mäkelä

Merge 11.0 into 11.1

f2b4972... by Marko Mäkelä

Merge 10.11 into 11.0

bce3ee7... by Marko Mäkelä

Merge 10.10 into 10.11

b1b4726... by Marko Mäkelä

Merge 10.9 into 10.10

864bbd4... by Marko Mäkelä

Merge 10.6 into 10.9

23d1092... by Ian Gilfillan <email address hidden>

Update 10.11 HELP

936edd8... by Ian Gilfillan <email address hidden>

Update 11.0 HELP