Last commit made on 2022-08-09
Get this branch:
git clone -b bb-10.10-MDEV-28883

Branch merges

Branch information


Recent commits

9df047f... by Andrei <email address hidden>

MDEV-24660 MYSQL_BIN_LOG::cleanup(): Assertion `b->xid_count == 0'

The assert fired at shutdown time to indicate a missed decrement to
the count. The counter could not have been decremented because
the binlog background thread had already gone.

Fixed with relocation the binlog background thread exit in the server
shutdown module.

373a00f... 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>

b290627... by Igor Babaev

Assertion failure with UPDATE of view using MERGE table

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

cd8b27b... 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>

2db18fd... by Igor Babaev

MDEV-28883 Re-design the upper level of handling UPDATE and DELETE statements

This patch introduces a new way of handling UPDATE and DELETE commands at
the top level after the parsing phase. This new way of processing update
and delete statements can be seen in the implementation of the prepare()
and execute() methods from the new Sql_cmd_dml class. This class derived
from the Sql_cmd class can be considered as an interface class for processing
such commands as SELECT, INSERT, UPDATE, DELETE and other comands
manipulating data in tables.
With this patch processing of update and delete statements after parsing
proceeds by the following schema:
  - precheck of the access rights is performed for the used tables
  - the used tables are opened
  - context analysis phase is performed for the statement
  - the used tables are locked
  - the statement is optimized and executed
  - clean-up is performed for the statement
The implementation of the method Sql_cmd_dml::execute() adheres this schema.
The virtual functions of the class Sql_cmd_dml used for precheck of the
access rights, context analysis, optimization and execution allow to adjust
this schema for processing data manipulation statements of any types.

This schema of processing data manipulation statements is taken from the
current MySQL code. Moreover the definition the class Sql_cmd_dml introduced
in this patch is almost a full replica of such class in the existing MySQL.
However the implementation of the derived classes for update and delete
statements is quite different. This implementation employs the JOIN class
for all kinds of update and delete statements. It allows to perform main
bulk of context analysis actions by the function JOIN::prepare(). This
guarantees that characteristics and properties of the statement tree
discovered for optimization phase when doing context analysis are the same
for single-table and multi-table updates and deletes.

With this patch the following functions are gone:
  mysql_prepare_update(), mysql_multi_update_prepare(),
  mysql_update(), mysql_multi_update(),
  mysql_prepare_delete(), mysql_multi_delete_prepare(), mysql_delete().
The code within these functions have been used as much as possible though.
The functions mysql_test_update() and mysql_test_delete() are also not
needed anymore. The method Sql_cmd_dml::prepare() serves processing
  - update/delete statement
  - PREPARE stmt FROM "<update/delete statement>"
  - EXECUTE stmt when stmt is prepared from update/delete statement.

Approved by Oleksandr Byelkin <email address hidden>

ada8280... by Marko Mäkelä

Merge 10.9 into 10.10

b81460f... by Marko Mäkelä

Merge 10.8 into 10.9

b356309... by Marko Mäkelä

Merge 10.7 into 10.8

5d0496c... by Marko Mäkelä

Merge 10.6 into 10.7

f2f18e2... by Marko Mäkelä

MDEV-28923 atomic.rename_table occasionally fails

fil_name_process(): If the recovery of a tablespace was deferred,
do invoke fil_ibd_load() even though the name in recv_spaces is
not changing. This allows us to recover from a situation where
there are many FILE_RENAME records, renaming a tablespace back
and forth, and a FILE_MODIFY record that had been written by

Co-developed with: Thirunarayanan Balathandayuthapani