maria:bb-10.3-igor

Last commit made on 2023-01-25
Get this branch:
git clone -b bb-10.3-igor https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.3-igor
Repository:
lp:maria

Recent commits

4652260... by Igor Babaev

MDEV-28616 Crash when using derived table over union with order by clause

This bug manifested itself when the server processed a query containing
a derived table over union whose ORDER BY clause included a subquery
with unresolvable column reference. For such a query the server crashed
when trying to resolve column references in the ORDER BY clause used by
union.
For any union with ORDER BY clause an extra SELECT_LEX structure is created
and it is attached to SELECT_LEX_UNIT structure of the union via the field
fake_select_lex. The outer context for fake_select_lex must be the same as
for other selects of the union. If the union is used in the FROM list of
a derived table then the outer context for fake_select_lex must be set to
NULL in line with other selects of the union. It was not done and it
caused a crash when searching for possible resolution of an unresolvable
column reference occurred in a subquery used in the ORDER BY clause.

Approved by Oleksandr Byelkin <email address hidden>

2279ddd... by Vladislav Vaintroub

MDEV-30457 Windows, signtool error "No file digest algorithm specified."

Add /fd parameter. It is now mandatory for the recent versions of
signtool

7fe9324... by Andrei <email address hidden>

MDEV-30323 Some DDLs like ANALYZE can complete on parallel slave out of order

ANALYZE was observed to race over a preceding in binlog order DML
in updating the binlog and slave gtid states.

Tagging ANALYZE and other admin class commands in binlog by the fixes
of MDEV-17515 left a flaw allowing such race leading to
the gtid mode out-of-order error.
This is fixed now to observe by ADMIN commands the ordered access to
the slave gtid status variables and binlog.

3aa04c0... by Andrei <email address hidden>

MDEV-30010 Slave (additional info): Commit failed due to failure of an earlier commit on which this one depends Error_code: 1964

This commit merely adds is a Read-Committed version MDEV-30225 test
solely to prove the RC isolation yields ROW binlog format as it is
supposed to per docs.

f513d71... by Igor Babaev

MDEV-30081 Crash with splitting from constant mergeable derived table

This bug manifested itself in very rare situations when splitting
optimization was applied to a materialized derived table with group clause
by key over a constant meargeable derived table that was in inner part of
an outer join. In this case the used tables for the key to access the
split table incorrectly was evaluated to a not empty table map.

Approved by Oleksandr Byelkin <email address hidden>

d69e835... by Brandon Nesterenko

MDEV-29639: Seconds_Behind_Master is incorrect for Delayed, Parallel Replicas

Problem
========
On a parallel, delayed replica, Seconds_Behind_Master will not be
calculated until after MASTER_DELAY seconds have passed and the
event has finished executing, resulting in potentially very large
values of Seconds_Behind_Master (which could be much larger than the
MASTER_DELAY parameter) for the entire duration the event is
delayed. This contradicts the documented MASTER_DELAY behavior,
which specifies how many seconds to withhold replicated events from
execution.

Solution
========
After a parallel replica idles, the first event after idling should
immediately update last_master_timestamp with the time that it began
execution on the primary.

Reviewed By
===========
Andrei Elkin <email address hidden>

2ed598e... by Sergey Petrunia

Added comments re JOIN::all_fields, JOIN::fields_list

c456303... by Ian Gilfillan <email address hidden>

Update 10.3 HELP tables

074bef4... by Igor Babaev

MDEV-30248 Infinite sequence of recursive calls when processing embedded CTE

This patch fixes the patch for bug MDEV-30248 that unsatisfactorily
resolved the problem of resolution of references to CTE. In some cases
when such a reference has the same table name as the name of one of
CTEs containing this reference the reference could be resolved incorrectly
that led to an invalid select tree where units could be mutually dependent.
This in its turn could lead to an infinite sequence of recursive calls or
to falls into infinite loops.

The patch also removes LEX::resolve_references_to_cte_in_hanging_cte() as
with the new code for resolution of CTE references the call of this
function is not needed anymore.

Approved by Oleksandr Byelkin <email address hidden>

f18c2b6... by Sergey Petrunia

MDEV-15178: Filesort::make_sortorder: Assertion `pos->field != __null |

(Initial patch by Varun Gupta. Amended and added comments).

When the query has both
1. Aggregate functions that require sorting data by group, and
2. Window functions

we need to use two temporary tables. The first temp.table will hold the
join output. Then it is passed to filesort(). Reading it in sorted
order allows to compute the aggregate functions.

Then, we need to write their values into the second temp. table. Then,
Window Function computation step can pass that to filesort() and read
them in the order it needs.

Failure to create the second temp. table would cause an assertion
failure: window function could would not find where to get the values
of the aggregate functions.