maria:bb-10.5-MDEV-28846

Last commit made on 2022-10-26
Get this branch:
git clone -b bb-10.5-MDEV-28846 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-MDEV-28846
Repository:
lp:maria

Recent commits

eee0fda... by Igor Babaev

MDEV-28846 Poor performance when rowid filter contains no elements

When a range rowid filter was used with an index ref access the cost of
accessing the index entries for the records rejected by the filter was not
taken into account. For a ref access by an index with big average number
of records per key this led to poor execution plans if selectivity of the
used filter was high.
The patch resolves this problem. It also introduces a minor optimization
that skips look-ups into a filter that turns out to be empty.
With this patch the output of ANALYZE stmt reports the number of look-ups
into used rowid filters.

The test cases that were supposed to use rowid filters have been adjusted
in order to use similar execution plans after this fix.

This patch prepared for 10.5 differs from the patch resolving the problem
for 10.4 because he code that calculates the cost of index only access has
been changed for 10.5 making usage of rowid filters more favorable.

Approved by Oleksandr Byelkin <email address hidden>

42802ad... by Brandon Nesterenko

MDEV-25616 XA PREPARE event group is not binlogged when..

the only query of the XA transaction is on a non-transactional table
errors out:

XA BEGIN 'x';
--error ER_DUP_ENTRY
INSERT INTO t1 VALUES (1),(1);
XA END 'x';
XA PREPARE 'x';

The binlogging pattern is correctly started as expected with
the errored-out Query or its ROW format events, but there is
no empty XA_prepare_log_event group.
The following

XA COMMIT 'x';

therefore should not be logged either, but it does.

The bug is fixed with proper maintaining of a read-write binlog hton
property and use it to enforce correct binlogging decisions.
Specifically in the bug description case XA COMMIT won't be binlogged
in both when given in the same connection and externally after disconnect.
The same continue to apply to an empty XA that do not change any data in all
transactional engines involved.

4b4c2b8... by Marko Mäkelä

Merge 10.4 into 10.5

9a0b9e3... by Marko Mäkelä

Merge 10.4 into 10.5

667d3fb... by Marko Mäkelä

Merge 10.3 into 10.4

2f7a007... by Ian Gilfillan <email address hidden>

MDEV-28701 Update 10.5 HELP tables

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

MDEV-28701 Update 10.4 HELP tables

34ff5ca... by Ian Gilfillan <email address hidden>

MDEV-28701 Update 10.3 HELP tables

8128a46... by Vlad Lesin

MDEV-28709 unexpected X lock on Supremum in READ COMMITTED

The lock is created during page splitting after moving records and
locks(lock_move_rec_list_(start|end)()) to the new page, and inheriting
the locks to the supremum of left page from the successor of the infimum
on right page.

There is no need in such inheritance for READ COMMITTED isolation level
and not-gap locks, so the fix is to add the corresponding condition in
gap lock inheritance function.

One more fix is to forbid gap lock inheritance if XA was prepared. Use the
most significant bit of trx_t::n_ref to indicate that gap lock inheritance
is forbidden. This fix is based on
mysql/mysql-server@b063e52a8367dc9d5ed418e7f6d96400867e9f43

ce2825a... by Andrew Hutchings

Fix Aria S3 building in FreeBSD (#2242)

FreeBSD 13 has libcurl in /usr/local/lib so linking failed just trying
to link curl by name. CMake finds curl's true place so let's use that.