maria:bb-10.6-MDEV-29593

Last commit made on 2023-04-20
Get this branch:
git clone -b bb-10.6-MDEV-29593 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-MDEV-29593
Repository:
lp:maria

Recent commits

f1aad47... by Marko Mäkelä

Cleanup: MONITOR_EXISTING trx_undo_slots_used, trx_undo_slots_cached

Let us remove explicit updates of MONITOR_NUM_UNDO_SLOT_USED
and MONITOR_NUM_UNDO_SLOT_CACHED, and let us compute the rough values
from trx_sys.rseg_array[] on demand.

6035919... by Marko Mäkelä

MDEV-29593 Purge misses a chance to free not-yet-reused undo pages

trx_purge_truncate_rseg_history(): If all other conditions for
invoking trx_purge_remove_log_hdr() hold, but the state is
TRX_UNDO_CACHED instead of TRX_UNDO_TO_PURGE, detach and free it.

27ff972... by Marko Mäkelä

MDEV-26827 fixup: Do not hog buf_pool.mutex

buf_flush_LRU_list_batch(): When evicting clean pages,
release and reacquire the buf_pool.mutex after every 32 pages.
Also, eliminate some conditional branches.

0cda0e4... by Marko Mäkelä

MDEV-31080 fil_validate() failures during deferred tablespace recovery

fil_space_t::create(), fil_space_t::add(): Expect the caller to
acquire and release fil_system.mutex. In this way, creating a tablespace
and adding the first (usually only) data file will be atomic.

recv_sys_t::recover_deferred(): Correctly protect some changes by
holding fil_system.mutex.

Tested by: Matthias Leich

78368e5... by Marko Mäkelä

MDEV-30863 fixup: Assertion failure when using innodb_undo_tablespaces=0

trx_assign_rseg_low(): Let us restore the debug variable look_for_rollover
to avoid assertion failures when a server that was created with
multiple undo tablespaces is being started with innodb_undo_tablespaces=0.

1892f5d... by Marko Mäkelä

MDEV-30863 fixup: Hang in a debug build

trx_assign_rseg_low(): Correct a debug injection condition.

485a1b1... by Marko Mäkelä

MDEV-30863 Server freeze, all threads in trx_assign_rseg_low()

trx_assign_rseg_low(): Simplify the debug check.

trx_rseg_t::reinit(): Reset the skip_allocation() flag.
This logic was broken in the merge
commit 3e2ad0e918d5d38322994ec9e08fc5dda3a80707
of commit 0de3be8cfdfc26f5c236eaefe12d03c7b4af22c8
(that is, innodb_undo_log_truncate=ON would never be "completed").

Tested by: Matthias Leich

c28d1a6... by Marko Mäkelä

Merge 10.5 into 10.6

1995c62... by Daniel Lenski <email address hidden>

[MDEV-30854] Do not use " as string delimiter in mariadb-tzinfo-to-sql

If SQL_MODE contains ANSI_QUOTES (https://mariadb.com/kb/en/sql-mode/), then
the double-quote character (") is not a legal string delimiter.

In https://github.com/MariaDB/server/commit/13e77930e615f05cc74d408110e887b00e1abcc9#diff-a333d4ebb2d73b6361ef7dfebc86d883f7e19853b4a9eb85984b039058fae47cR2431-R2435,
Daniel Black introduced a case where the double-quote character would be used as
a string delimiter in the SQL queries generated by mariadb-tzinfo-to-sql.

This tool tool generates SQL queries which should be able to run on any
MariaDB server of the matching version. Therefore, it should be extremely
conservative in the SQL that it outputs, in order to maximize the chance
that it can run regardless of the build or execution environment of the
server.

See MDEV-18778, MDEV-28263, and MDEV-28782 for previous cases where MariaDB
has FAILED TO ENSURE that the generated timezone.sql actually works in
different build and execution environments. More test coverage is clearly
needed here.

All new code of the whole pull request, including one or several files that are
either new files or modified ones, are contributed under the BSD-new license. I
am contributing on behalf of my employer Amazon Web Services, Inc.

8f87023... by Andrei <email address hidden>

MDEV-28777 binlog.binlog_truncate_multi_engine failed in bb with Lost connection

The 2013 error was right to catch the case B of the test unprepared
for an expected simulated crash.

The test gets refined to SELECT a (type of) bool value before the
crash is invoked.