maria:bb-10.6-MDEV-32788

Last commit made on 2023-11-13
Get this branch:
git clone -b bb-10.6-MDEV-32788 https://git.launchpad.net/maria

Branch merges

Branch information

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

Recent commits

35aea1e... by Dmitry Shulga <email address hidden>

MDEV-32788: Building of server fails on MacOS on compilation of trx0purge.cc

The method srw_lock_impl of the template class srw_lock_impl
is conditionally defined under #ifndef SUX_LOCK_GENERIC but
called unconditionally that could result in compilation failure

04477bd... by VladislavVaintroub

MDEV-28836 fix crashing PFS unit tests on Windows.

In stub_pfs_global, use aligned_free() for pfs_free(), to match
aligned_malloc() in pfs_malloc()

b52b7b4... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-31851 Doublewrite recovery fixup

recv_dblwr_t::find_page(): Tablespace flags validity should be
checked only for page 0.

1fc2843... by Marko Mäkelä

MDEV-31826: File handle leak on failed IMPORT TABLESPACE

fil_space_t::drop(): If the caller is not interested in a
detached handle, close it immediately.

90e1148... by Sergei Golubchik

update C/C - compilation failure with gcc7 on s390x-sles-12

0cc809f... by Marko Mäkelä

MDEV-31826: Memory leak on failed IMPORT TABLESPACE

fil_delete_tablespace(): Invoke fil_space_free_low() directly.
This fixes up commit 39e3ca8bd25fc539ed08ff464e8a3189ff9f7fa3

6f09143... by Monty <email address hidden>

MDEV-32531 MSAN / Valgrind errors in Item_func_like::get_mm_leaf with temporal field

Added missing initializer

ab6139d... by Rex Johnston

MDEV-32612 Assertion `tab->select->quick' failed in test_if_skip_sort_order

Fixup for MDEV-31983, incorrect test for checking ability to use quick select.

Approved by Sergei Petrunia

5b53342... by Marko Mäkelä

MDEV-32588 InnoDB may hang when running out of buffer pool

buf_flush_LRU_list_batch(): Do not skip pages that are actually clean
but in buf_pool.flush_list due to the "lazy removal" optimization of
commit 22b62edaedddb1cabd5b855cdd39a5e90a5695a2, but try to evict them.
After acquiring buf_pool.flush_list_mutex, reread oldest_modification
to ensure that the block still remains in buf_pool.flush_list.

In addition to server hangs, this bug could also cause
InnoDB: Failing assertion: list.count > 0
in invocations of UT_LIST_REMOVE(flush_list, ...).

This fixes a regression that was caused by
commit a55b951e6082a4ce9a1f2ed5ee176ea7dbbaf1f2
and possibly made more likely to hit due to
commit aa719b5010c929132b4460b78113fbd07497d9c8.

39e3ca8... by Marko Mäkelä

MDEV-31826 InnoDB may fail to recover after being killed in fil_delete_tablespace()

InnoDB was violating the write-ahead-logging protocol when a file
was being deleted, like this:

1. fil_delete_tablespace() set the fil_space_t::STOPPING flag
2. The buf_flush_page_cleaner() thread discards some changed pages for
this tablespace advances the log checkpoint a little.
3. The server process is killed before fil_delete_tablespace() wrote
a FILE_DELETE record.
4. Recovery will try to apply log to pages of the tablespace, because
there was no FILE_DELETE record. This will fail, because some pages
that had been modified since the latest checkpoint had not been written
by the page cleaner.

Page writes must not be stopped before a FILE_DELETE record has been
durably written.

fil_space_t::drop(): Replaces fil_space_t::check_pending_operations().
Add the parameter detached_handle, and return a tablespace pointer
if this thread was the first one to stop I/O on the tablespace.

mtr_t::commit_file(): Remove the parameter detached_handle, and
move some handling to fil_space_t::drop().

fil_space_t: STOPPING_READS, STOPPING_WRITES: Separate flags for STOPPING.
We want to stop reads (and encryption) before stopping page writes.

fil_space_t::is_stopping_writes(), fil_space_t::get_for_write():
Special accessors for the write path.

fil_space_t::flush_low(): Ignore the STOPPING_READS flag and only
stop if STOPPING_WRITES is set, to avoid an infinite loop in
fil_flush_file_spaces(), which was occasionally repeated by
running the test encryption.create_or_replace.

Reviewed by: Vladislav Lesin
Tested by: Matthias Leich