maria:bb-MDEV-7487-rebased-against-11.0.1

Last commit made on 2023-03-10
Get this branch:
git clone -b bb-MDEV-7487-rebased-against-11.0.1 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-MDEV-7487-rebased-against-11.0.1
Repository:
lp:maria

Recent commits

2ae8dc2... by Igor Babaev

Adjusted test results after rebase against 11.0.1

1284054... by Igor Babaev

Fixes of MDEV-30538 and MDEV-30586 for 10.4 adjusted for 11.0.

The commits for MDEV-30538 and MDEV-30586 could not be cherry-picked into
11.0 separately.

fab0f36... by Igor Babaev

MDEV-7487 Semi-join optimization for single-table update/delete statements

This patch allows to use semi-join optimization at the top level of
single-table update and delete statements.
The problem of supporting such optimization became easy to resolve after
processing a single-table update/delete statement started using JOIN
structure. This allowed to use JOIN::prepare() not only for multi-table
updates/deletes but for single-table ones as well. This was done in the
patch for mdev-28883:
Re-design the upper level of handling UPDATE and DELETE statements.

Note that JOIN::prepare() detects all subqueries that can be considered
as candidates for semi-join optimization. The code added by this patch
looks for such candidates at the top level and if such candidates are found
in the processed single-table update/delete the statement is handled in
the same way as a multi-table update/delete.

    Approved by Oleksandr Byelkin <email address hidden>

4127039... by Igor Babaev

Another fix after the latest rebase of commits for MDEV-28883

ace2e99... by Igor Babaev

MDEV-29428 Incorrect result for delete with "order by" clause

ORDER BY clause without LIMIT clause can be removed from DELETE statements.

4615099... by Igor Babaev

Fix after the latest rebase of commits for MDEV-28883

f8d61c3... by Igor Babaev

Applied the changes introduced in the commit

92a328099800486fe585a54d31ddf84c02ec6ae0
Author: Oleksandr Byelkin <email address hidden> Tue Jul 12 00:25:08 2022
Committer: Oleksandr Byelkin <email address hidden> Thu Jul 14 00:46:06 2022

for the code of MDEV-28883.

783ac3a... by Igor Babaev

MDEV-29189 Crash of the second execution of SF using DELETE/UPDATE

This bug caused a crash of the server at the second execution of a stored
function that used DELETE or UPDATE statement if the first execution
of this function reported an error encountered after the prepare phase.
This happened because in such cases the executed DELETE/UPDATE statement
remained marked as prepared. As a result the second execution of SF missed
the prepare phase for the statement altogether and the statement could not
be executed properly.

Approved by Oleksandr Byelkin <email address hidden>

a5e21cf... by Igor Babaev

Assertion failure with UPDATE of view using MERGE table

The problem was caused by an assertion that is not valid anymore.

d3894e7... by Igor Babaev

MDEV-28965 Assertion failure when preparing UPDATE with derived table in WHERE

This patch fixes not only the assertion failure in the function
Field_iterator_table_ref::set_field_iterator() but also:
 - fixes the problem of forced materialization of derived tables used
   in subqueries contained in WHERE clauses of single-table and multi-table
   UPDATE and DELETE statements
 - fixes the problem of MDEV-17954 that prevented execution of multi-table
   DELETE statements if they use in their WHERE clauses references to
   the tables that are updated.

The patch must be considered a complement to the patch for MDEV-28883.

Approved by Oleksandr Byelkin <email address hidden>