maria:bb-10.10-mdev-7487

Last commit made on 2022-06-20
Get this branch:
git clone -b bb-10.10-mdev-7487 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.10-mdev-7487
Repository:
lp:maria

Recent commits

2adebf4... 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>

f7d2374... by Sergei Golubchik

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

compilation failure (fall-through)
and ubsan failure (load of value 2779096485, which is not a valid value for type 'enum_lock_tables_state')

db2a0e7... by Sergei Golubchik

MDEV-27104 deprecate DES_ENCRYPT/DECRYPT functions

ed18f25... by Sergei Golubchik

don't use ssl for windows named pipes - it doesn't work

69b3069... by Sergei Golubchik

MDEV-27105 --ssl option set as default for mariadb CLI

but without server cert verification

f3271d9... by Alexander Barkov

MDEV-23287 The INET4 data type

700a703... by Vanislavsky <email address hidden>

MDEV-25704 Add RANDOM_BYTES function

MySQL 5.6 added the RANDOM_BYTES function.
https://dev.mysql.com/doc/refman/5.6/en/encryption-functions.html#function_random-bytes

This is needed for compatibility purposes.

49182ad... by Sergei Golubchik

MDEV-28632 Change default of explicit_defaults_for_timestamp to ON

3a966e3... by Sergei Golubchik

remove invalid test

it starts an EXPLAIN of a multi-table join and tries to KILL it.
no sync points.
depending on how fast the hareware is and optimizer development
it might kill EXPLAIN at some random point in time (generally unrelated
to the Bug#28598 it was supposed to test) or EXPLAIN might finish
before the KILL and the test will fail.

596cde0... 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>