maria:bb-10.4-MDEV-28641-galera

Last commit made on 2023-03-31
Get this branch:
git clone -b bb-10.4-MDEV-28641-galera https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-MDEV-28641-galera
Repository:
lp:maria

Recent commits

9fe5375... by =?utf-8?q?Jan_Lindstr=C3=B6m?= <email address hidden>

MDEV-28641 : Query cache entries not invalidated on slave of a Galera cluster

Query cache should be invalidated if we are not in applier. For some
reason this condition was incorrect starting from 10.5 but it is
correct in 10.4.

Signed-off-by: Julius Goryavsky <email address hidden>

e093e5a... by Daniel Black

MDEV-30276 - wsrep_sst_mariabackup to use mariadb-backup

rather than mariabackup internally, and change and messages accordingly.

402f36d... by Marko Mäkelä

MDEV-30936 fixup

fil_space_t::~fil_space_t(): Invoke ut_free(name) because
doing so in the callers would trip MSAN_OPTIONS=poison_in_dtor=1

dfa9025... by Marko Mäkelä

MDEV-30936 clang 15.0.7 -fsanitize=memory fails massively

handle_slave_io(), handle_slave_sql(), os_thread_exit():
Remove a redundant pthread_exit(nullptr) call, because it
would cause SIGSEGV.

mysql_print_status(): Add MEM_MAKE_DEFINED() to work around
some missing instrumentation around mallinfo2().

que_graph_free_stat_list(): Invoke que_node_get_next(node) before
que_graph_free_recursive(node). That is the logical and
MSAN_OPTIONS=poison_in_dtor=1 compatible way of freeing memory.

ins_node_t::~ins_node_t(): Invoke mem_heap_free(entry_sys_heap).

que_graph_free_recursive(): Rely on ins_node_t::~ins_node_t().

fts_t::~fts_t(): Invoke mem_heap_free(fts_heap).

fts_free(): Replace with direct calls to fts_t::~fts_t().

The failures in free_root() due to MSAN_OPTIONS=poison_in_dtor=1
will be covered in MDEV-30942.

a8b616d... by midenok

MDEV-30421 rpl_parallel_*.test cleanup

Moved rpl_parallel_*.inc to rpl_parallel_*.test

701399a... by Marko Mäkelä

MDEV-30882 Crash on ROLLBACK in a ROW_FORMAT=COMPRESSED table

btr_cur_upd_rec_in_place(): Avoid calling page_zip_write_rec() if we
are not modifying any fields that are stored in compressed format.

btr_cur_update_in_place_zip_check(): New function to check if a
ROW_FORMAT=COMPRESSED record can actually be updated in place.

btr_cur_pessimistic_update(): If the BTR_KEEP_POS_FLAG is not set
(we are in a ROLLBACK and cannot write any BLOBs), ignore the potential
overflow and let page_zip_reorganize() or page_zip_compress() handle it.
This avoids a failure when an attempted UPDATE of an NULL column to 0 is
rolled back. During the ROLLBACK, we would try to move a non-updated
long column to off-page storage in order to avoid a compression failure
of the ROW_FORMAT=COMPRESSED page.

page_zip_write_trx_id_and_roll_ptr(): Remove an assertion that would fail
in row_upd_rec_in_place() because the uncompressed page would already
have been modified there.

This is a 10.5 version of commit ff3d4395d808b6421d2e0714e10d48c7aa2f3c3a
(different because of commit 08ba388713946c03aa591899cd3a446a6202f882).

dccbb5a... by Tingyao Nian <email address hidden>

[MDEV-30824] Fix binlog to use 'String' for setting 'character_set_client'

Commit a923d6f49c1ad6fd3f4d6ec02e444c26e4d1dfa8 disabled numeric setting
of character_set_* variables with non-default values:

  MariaDB [(none)]> set character_set_client=224;
  ERROR 1115 (42000): Unknown character set: '224'

However the corresponding binlog functionality still write numeric
values for log event, and this will break binlog replay if the value is
not default. Now make the server use 'String' type for
'character_set_client' when generating binlog events

Before:

  /*!\C utf8mb4 *//*!*/;
  SET @@session.character_set_client=224,@@session.collation_connection=224,@@session.collation_server=33/*!*/;

After:

  /*!\C utf8mb4 *//*!*/;
  SET @@session.character_set_client=utf8mb4,@@session.collation_connection=33,@@session.collation_server=8/*!*/;

Note: prior to the previous commit, setting with '224' or '45' or
'utf8mb4' have the same effect, as they all set the parameter to
'utf8mb4'.

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.

1495f05... by Marko Mäkelä

MDEV-30860 Race condition between buffer pool flush and log file deletion in mariadb-backup --prepare

srv_start(): If we are going to close the log file in
mariadb-backup --prepare, call buf_flush_sync() before
calling recv_sys.debug_free() to ensure that the log file
will not be accessed.

This fixes a rather rare failure in the test
mariabackup.innodb_force_recovery where buf_flush_page_cleaner()
would invoke log_checkpoint_low() because !recv_recovery_is_on()
would hold due to the fact that recv_sys.debug_free() had
already been called. Then, the log write for the checkpoint
would fail because srv_start() had invoked log_sys.log.close_file().

7d6b3d4... by Vlad Lesin

MDEV-30775 Performance regression in fil_space_t::try_to_close() introduced in MDEV-23855

fil_node_open_file_low() tries to close files from the top of
fil_system.space_list if the number of opened files is exceeded.

It invokes fil_space_t::try_to_close(), which iterates the list searching
for the first opened space. Then it just closes the space, leaving it in
the same position in fil_system.space_list.

On heavy files opening, like during 'SHOW TABLE STATUS ...' execution,
if the number of opened files limit is reached,
fil_space_t::try_to_close() iterates more and more closed spaces before
reaching any opened space for each fil_node_open_file_low() call. What
causes performance regression if the number of spaces is big enough.

The fix is to keep opened spaces at the top of fil_system.space_list,
and move closed files at the end of the list.

For this purpose fil_space_t::space_list_last_opened pointer is
introduced. It points to the last inserted opened space in
fil_space_t::space_list. When space is opened, it's inserted to the
position just after the pointer points to in fil_space_t::space_list to
preserve the logic, inroduced in MDEV-23855. Any closed space is added
to the end of fil_space_t::space_list.

As opened spaces are located at the top of fil_space_t::space_list,
fil_space_t::try_to_close() finds opened space faster.

There can be the case when opened and closed spaces are mixed in
fil_space_t::space_list if fil_system.freeze_space_list was set during
fil_node_open_file_low() execution. But this should not cause any error,
as fil_space_t::try_to_close() still iterates spaces in the list.

There is no need in any test case for the fix, as it does not change any
functionality, but just fixes performance regression.

08267ba... by Marko Mäkelä

MDEV-30819 InnoDB fails to start up after downgrading from MariaDB 11.0

While downgrades are not supported and misguided attempts at it could
cause serious corruption especially after
commit b07920b634f455c39e3650c6163bec2a8ce0ffe0
it might be useful if InnoDB would start up even after an upgrade to
MariaDB Server 11.0 or later had removed the change buffer.

innodb_change_buffering_update(): Disallow anything else than
innodb_change_buffering=none when the change buffer is corrupted.

ibuf_init_at_db_start(): Mention a possible downgrade in the corruption
error message. If innodb_change_buffering=none, ignore the error but do
not initialize ibuf.index.

ibuf_free_excess_pages(), ibuf_contract(), ibuf_merge_space(),
ibuf_update_max_tablespace_id(), ibuf_delete_for_discarded_space(),
ibuf_print(): Check for !ibuf.index.

ibuf_check_bitmap_on_import(): Remove some unnecessary code.
This function is only accessing change buffer bitmap pages in a
data file that is not attached to the rest of the database.
It is not accessing the change buffer tree itself, hence it does
not need any additional mutex protection.

This has been tested both by starting up MariaDB Server 10.8 on
a 11.0 data directory, and by running ./mtr --big-test while
ibuf_init_at_db_start() was tweaked to always fail.