maria:bb-10.5-MDEV-31892

Last commit made on 2023-08-18
Get this branch:
git clone -b bb-10.5-MDEV-31892 https://git.launchpad.net/maria

Branch merges

Branch information

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

Recent commits

cb68024... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-31892 Server crash upon moving InnoDB table with
   fulltext index between databases

- InnoDB tries to open the auxilary table which
starts with the name of old databases. So it leads
to abort of server.

row_merge_create_fts_sort_index(): Pass new table
for the temporary fts sort index to be created

fts_rename_aux_tables(): Iterate all the indexes
to rename the auxiliary index tables.

5895a36... by Marko Mäkelä

Merge 10.4 into 10.5

5a8a8fc... by Marko Mäkelä

MDEV-31928 Assertion xid ... < 128 failed in trx_undo_write_xid()

trx_undo_write_xid(): Correct an off-by-one error in a debug assertion.

518fe51... by Marko Mäkelä

MDEV-31254 InnoDB: Trying to read doublewrite buffer page

buf_read_page_low(): Remove an error message that could be triggered
by buf_read_ahead_linear() or buf_read_ahead_random().

This is a backport of commit c9eff1a144ba44846373660a30d342d3f0dc91a5
from MariaDB Server 10.5.

44df6f3... by Marko Mäkelä

MDEV-31875 ROW_FORMAT=COMPRESSED table: InnoDB: ... Only 0 bytes read

buf_read_ahead_random(), buf_read_ahead_linear(): Avoid read-ahead
of the last page(s) of ROW_FORMAT=COMPRESSED tablespaces that use
a page size of 1024 or 2048 bytes. We invoke os_file_set_size() on
integer multiples of 4096 bytes in order to be compatible with
the requirements of innodb_flush_method=O_DIRECT regardless of the
physical block size of the underlying storage.

This change must be null-merged to MariaDB Server 10.5 and later.
There, out-of-bounds read-ahead should be handled gracefully
by simply discarding the buffer page that had been allocated.

Tested by: Matthias Leich

34e8585... by Kristian Nielsen

MDEV-29974: Missed kill waiting for worker queues to drain

When the SQL driver thread goes to wait for room in the parallel slave
worker queue, there was a race where a kill at the right moment could
be ignored and the wait proceed uninterrupted by the kill.

Fix by moving the THD::check_killed() to occur _after_ doing ENTER_COND().

This bug was seen as sporadic failure of the testcase rpl.rpl_parallel
(rpl.rpl_parallel_gco_wait_kill since 10.5), with "Slave stopped with
wrong error code".

Signed-off-by: Kristian Nielsen <email address hidden>

7c9837c... by Kristian Nielsen

Merge 10.4 into 10.5

Signed-off-by: Kristian Nielsen <email address hidden>

900c4d6... by Kristian Nielsen

MDEV-31655: Parallel replication deadlock victim preference code errorneously removed

Restore code to make InnoDB choose the second transaction as a deadlock
victim if two transactions deadlock that need to commit in-order for
parallel replication. This code was erroneously removed when VATS was
implemented in InnoDB.

Also add a test case for InnoDB choosing the right deadlock victim.
Also fixes this bug, with testcase that reliably reproduces:

MDEV-28776: rpl.rpl_mark_optimize_tbl_ddl fails with timeout on sync_with_master

Note: This should be null-merged to 10.6, as a different fix is needed
there due to InnoDB locking code changes.

Signed-off-by: Kristian Nielsen <email address hidden>

920789e... by Kristian Nielsen

MDEV-31482: Lock wait timeout with INSERT-SELECT, autoinc, and statement-based replication

Remove the exception that InnoDB does not report auto-increment locks waits
to the parallel replication.

There was an assumption that these waits could not cause conflicts with
in-order parallel replication and thus need not be reported. However, this
assumption is wrong and it is possible to get conflicts that lead to hangs
for the duration of --innodb-lock-wait-timeout. This can be seen with three
transactions:

1. T1 is waiting for T3 on an autoinc lock
2. T2 is waiting for T1 to commit
3. T3 is waiting on a normal row lock held by T2

Here, T3 needs to be deadlock killed on the wait by T1.

Note: This should be null-merged to 10.6, as a different fix is needed
there due to InnoDB lock code changes.

Signed-off-by: Kristian Nielsen <email address hidden>

b4ace13... by Marko Mäkelä

Remove the often-hanging test innodb.alter_rename_files

The test innodb.alter_rename_files rather frequently hangs in
checkpoint_set_now. The test was removed in MariaDB Server 10.5
commit 37e7bde12abddcda4d5505450e39a739561bd4d5 when the code that
it aimed to cover was simplified. Starting with MariaDB Server 10.5
the page flushing and log checkpointing is much simpler, handled
by the single buf_flush_page_cleaner() thread.

Let us remove the test to avoid occasional failures. We are not going
to fix the cause of the failure in MariaDB Server 10.4.