maria:10.4-MDEV-30073

Last commit made on 2023-04-18
Get this branch:
git clone -b 10.4-MDEV-30073 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
10.4-MDEV-30073
Repository:
lp:maria

Recent commits

671a900... by Dmitry Shulga <email address hidden>

MDEV-30073: Stored Procedure Returns Corrupt Results When Run a Second Time

When name resolution is performed for a view involved in a query
executed as Prepared Statement, changes in an item list of view's select_lex
is resgistered for rollback with Item_change_list::rollback_item_tree_changes.
Later, EXISTS-to-IN transformation takes place and previously resolved items
are replace with new items created as part of EXISTS-to-IN transformation.
This change is supposed to be permanent, so it is not recorded for rollback.
On fininishing execution of a prepared statement clean-up is performed
that does rollback of changes made on phase of name resolutions.
In result, changes made by EXISTS-to-IN transformation is rolled back
that lead to output of incorrect results set.

To fix the original issue it is proposed to make permanent name resolution
for view's fields.

Unfortunately, this fix introduces another issue that takes plce when
join of a regular table and a view is run and there is condition
  'where exist (subquery)'
(see test case in the patch)

bc3bfcf... by Daniele Sciascia <email address hidden>

MDEV-30862 Assertion `mode_ == m_high_priority' failed

CREATE TABLE AS SELECT is not supported in combination with streaming
replication.

f575de3... by Florian Weimer

rocksdb: Define _GNU_SOURCE during fallocate CMake probe

The glibc headers declare fallocate only if _GNU_SOURCE is defined.
Without this change, the probe fails with C compilers which do not
support implicit function declarations even if the system does in
fact support the fallocate function.

Upstream rocksdb does not need this because the probe is run with the
C++ compiler, and current g++ versions define _GNU_SOURCE
automatically.

2e1c532... by Daniel Black

alloca() fix

Corrections from 1e58b8afc086da755cf9209ed17fc36351da5563.
* Re-add #pragma alloca for AIX - now in my_alloca.h

d1a4315... by Julius Goryavsky <email address hidden>

MDEV-30402: Encrypted mariabackup SST breaks on distributions with newer socat

This commit adds a new 'no-sni' option to socat which is required to
properly authenticate with newer socat versions (after version 1.7.4+).
This option is needed to disable the automatic use of the SNI feature
(Server Name Indication) since the SST script directly specifies the
commonname if necessary and automatic activation of the SNI feature
is unnecessary in such scenarios.

ef4d099... by Igor Babaev

MDEV-20773 Error from UPDATE when estimating selectivity of a range

This bug could affect multi-update statements as well as single-table
update statements processed as multi-updates when the where condition
contained a range condition over a non-indexed varchar column. The
optimizer calculates selectivity of such range conditions using histograms.
For each range the buckets containing endpoints of the the range are
determined with a procedure that stores the values of the endpoints in the
space of the record buffer where values of the columns are usually stored.
For a range over a varchar column the value of a endpoint may exceed the
size of the buffer and in such case the value is stored with truncation.
This truncations cannot affect the result of the calculation of the range
selectivity as the calculation employes only the beginning of the value
string. However it can trigger generation of an unexpected error on this
truncation if an update statement is processed.
This patch prohibits truncation messages when selectivity of a range
condition is calculated for a non-indexed column.

Approved by Oleksandr Byelkin <email address hidden>

7bcfa00... by Alexander Barkov

MDEV-31039 mariadb-backup: remove global variables ds_data and ds_meta

This is a non-functional change.

simplifying the code logic:
- removing global variables ds_data and ds_meta
- passing these variables as parameters to functions instead
- adding helper classes: Datasink_free_list and Backup_datasinks
- moving some function accepting a ds_ctxt parameter
  as methods to ds_ctxt.

f83b7ae... by =?utf-8?q?Jan_Lindstr=C3=B6m?= <email address hidden>

MDEV-26175 : Assertion `! thd->in_sub_stmt' failed in bool trans_rollback_stmt(THD*)

If we are inside stored function or trigger we should not commit
or rollback current statement transaction.

Signed-off-by: Julius Goryavsky <email address hidden>

4daea2f... by lilinjie <email address hidden>

fix typo

Signed-off-by: lilinjie <email address hidden>

ed2adc8... by Alexander Barkov

MDEV-28190 sql_mode makes MDEV-371 virtual column expressions nondeterministic

This problem was fixed earlier by MDEV-27653.
Adding MTR tests only.