maria:bb-10.3-mdev-29447

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

Branch merges

Branch information

Name:
bb-10.3-mdev-29447
Repository:
lp:maria

Recent commits

3ea2f6a... by Yuchen Pei

MDEV-29447 MDEV-26285 Refactor spider_db_mbase_util::open_item_func

spider_db_mbase_util::open_item_func() is a monster function.
It is difficult to maintain while it is expected that we need to
modify it when a new SQL function or a new func_type is added.

We split the function into two distinct functions: one handles the
case of str != NULL and the other handles the case of str == NULL.

This refactoring was done in a conservative way because we do not
have comprehensive tests on the function.

It also fixes a problem (MDEV-29447) where field items that are
arguments of a func item may be used before created / initialised.

Note this commit is a port of
3836098c29ef1b7ff9d5fbde99b690eab73a0df1 (MDEV-26285) to current
versions 10.3+.

Signed-off-by: Yuchen Pei <email address hidden>

f812f8e... by Vladislav Vaintroub

MDEV-30475 Windows, mtr - Remove outdated instructions on how to install post-mortem debugger

Also, use standard C:\symbols location for OS debugging symbols cache,
rather than own invention C:\cdb_symbols.

895673d... by Alexander Barkov

MDEV-30151 parse error 1=2 not between/in

This patch fixes the problem by adding a new rule booleat_test.
This makes the grammar clearer and less conflicting.

Additionally, fixing %prec in this grammar branch:

- | boolean_test IS NULL_SYM %prec PREC_BELOW_NOT
+ | boolean_test IS NULL_SYM %prec IS

to have consistently "%prec IS" in all grammar branches starting
with "boolean_test IS ...".
It's not clear why these three rules needed different %prec before the fix:

- boolean_test IS TRUE
- boolean_test IS UNKNOWN
- boolean_test IS NULL

b1043ea... by Alexander Barkov

Revert "MDEV-30151 parse error 1=2 not between/in"

This reverts commit eba099184e1f6704894694ea41f97f216eae5f21.

A different patch with less shift-reduce conflicts is coming.

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>