maria:bb-10.4-jan-fix

Last commit made on 2023-01-15
Get this branch:
git clone -b bb-10.4-jan-fix https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-jan-fix
Repository:
lp:maria

Recent commits

9335e2a... by Jan Lindström

Revert "Merge branch 10.4 into 10.5"

This reverts commit 179c2833721292a918280b7d114d94d81020105b, reversing
changes made to a44d896f98f2d2a3ebf0f1393bf84fd659ecd225.

179c283... by Jan Lindström

Merge branch 10.4 into 10.5

a44d896... by sjaakola <email address hidden>

10.4-MDEV-29684 Fixes for cluster wide write conflict resolving

If two high priority threads have lock conflict, we look at the
order of these transactions and honor the earlier transaction.
for_locking parameter in lock_rec_has_to_wait() has become
obsolete and it is now removed from the code .

Reviewed-by: Jan Lindström <email address hidden>

981a6b7... by Monty <email address hidden>

MDEV-30395 Wrong result with semijoin and Federated as outer table

The problem was that federated engine does not support comparable rowids
which was not taken into account by semijoin code.

Fixed by checking that we don't use semijoin with tables that does not
support comparable rowids.

Other things:
- Fixed some typos in the code comments

0595dd0... by Monty <email address hidden>

MDEV-30080 Wrong result with LEFT JOINs involving constant tables

The reason things fails in 10.5 and above is that test_quick_select()
returns -1 (impossible range) for empty tables if there are any
conditions attached.

This didn't happen in 10.4 as the cost for a range was more than for
a table scan with 0 rows and get_key_scan_params() did not create any
range plans and thus did not mark the range as impossible.

The code that checked the 'impossible range' conditions did not take
into account all cases of LEFT JOIN usage.

Adding an extra check if the table is used with an ON condition in case
of 'impossible range' fixes the issue.

0ff7f33... by sjaakola <email address hidden>

10.4-MDEV-29684 Fixes for cluster wide write conflict resolving

The rather recent thd_need_ordering_with() function does not take
high priority transactions' order in consideration. Chaged this
funtion to compare also transaction seqnos and favor earlier transaction.

Reviewed-by: Jan Lindström <email address hidden>

68cfcf9... by sjaakola <email address hidden>

MDEV-29512 deadlock between commit monitor and THD::LOCK_thd_data mutex

This commit contains only a mtr test for reproducing the issue in MDEV-29512
The actual fix will be pushed in wsrep-lib repository

The hanging in MDEV-29512 happens when binlog purging is attempted, and there is
one local BF aborted transaction waiting for commit monitor.

The test will launch two node cluster and enable binlogging with expire log days,
to force binlog purging to happen.
A local transaction is executed so that will become BF abort victim, and has advanced
to replication stage waiting for commit monitor for final cleanup (to mark position in innodb)
after that, applier is released to complete the BF abort and due to binlog configuration,
starting the binlog purging. This is where the hanging would occur, if code is buggy

Reviewed-by: Jan Lindström <email address hidden>

cd97523... by sjaakola <email address hidden>

MDEV-30317 Transaction savepoint may cause failure in galera replaying

Created mtr test for reproducing the crash

Developed actual fix for the issue.
Setting THD::system_thread_info.rpl_sql_info for replayer thread,
same way as it is handled for appliers.

Recorded test result, with the fix

Reviewed-by: Jan Lindström <email address hidden>

66c0532... by sjaakola <email address hidden>

MDEV-29684 Fixes for cluster wide write conflict resolving

Cluster conflict victim's THD is marked with wsrep_aborter.
THD::wsrep_aorter holds the thread ID of the hight priority tread,
which is currently carrying out BF aborting for this victim.

However, the BF abort operation is not always successful,
and in such case the wsrep_aborter mark should be removed.
In the old code, this wsrep_aborter resetting did not happen,
and this could lead to a situation where the sticky wsrep_aborter
mark prevents any further attempt to BF abort this transaction.

This commit fixes this issue, and resets wsrep_aborter after
unsuccesful BF abort attempt.

Reviewed-by: Jan Lindström <email address hidden>

73ecab3... by Marko Mäkelä

Merge 10.4 into 10.5