maria:bb-10.11-MDEV-33672-mergefix

Last commit made on 2024-04-09
Get this branch:
git clone -b bb-10.11-MDEV-33672-mergefix https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.11-MDEV-33672-mergefix
Repository:
lp:maria

Recent commits

9ff8d4f... by Brandon Nesterenko

MDEV-33672: 10.11 Fix for Two Phase Alter Flags

Extends 89c907bd4f713b77e248f7c8e6247b5f3be18fb4 to account for
binlog_two_phase_alter flags in a Gtid log event. I.e., if the
FL_COMMIT_ALTER_E1 or FL_ROLLBACK_ALTER_E2 flags are set in the
event flags, yet the length of the event is too short to hold
the value, then set the event as invalid

a838818... by Brandon Nesterenko

MDEV-33672: Gtid_log_event Construction from File Should Ensure Event Length When Using Extra Flags

A GTID event can have variable length, with contributing factors
such as the variable length from the flags2 and optional extra flags
fields. These fields are bitmaps, where each set bit indicates an
additional value that should be appended to the event, e.g.
multi-engine transactions append a number to indicate the number of
additional engines a transaction uses. However, if a flags bit is
set, and no additional fields are appended to the event, MDEV-33672
reports that the server can still try to read from memory as if it
did exist. Note, however, in debug builds, this condition is
asserted for FL_EXTRA_MULTI_ENGINE.

This patch fixes this to check that the length of the event is
aligned with the expectation set by the flags for FL_PREPARED_XA,
FL_COMPLETED_XA, and FL_EXTRA_MULTI_ENGINE.

Reviewed By
============
Kristian Nielsen <email address hidden>

42bda68... by Marko Mäkelä

MDEV-33585 follow-up optimization

log_t: Define buf_size, max_buf_free as 32-bit and next_checkpoint_no
as byte (we only need a bit) and rearrange some data members,
so that on AMD64 we can fit log_sys.latch and log_sys.log in
the same 64-byte cache line.

mtr_t::commit_log(), mtr_t::commit_logger: A part of mtr_t::commit()
split into a separate function, so that we will not unnecessarily invoke
log_sys.get_write_target() when running on a memory-mapped log file,
or log_sys.is_pmem().

Reviewed by: Vladislav Vaintroub
Tested by: Matthias Leich

0892e6d... by Marko Mäkelä

MDEV-33585 The maximum innodb_log_buffer_size is too large

On Microsoft Windows, ReadFile() as well as WriteFile() limit the size
of the request to DWORD, which is 32 bits (at most 4 GiB - 1) also on
64-bit systems.

On FreeBSD, sysctl debug.iosize_max_clamp could limit the size of a
write request to INT_MAX. The size of a read request is always limited
to INT_MAX. This would allow the request size to be 4095 bytes more than
the Linux limit (0x7ffff000 according to "man 2 read" and "man 2 write").

On OpenBSD, Solaris and possibly NetBSD, the read request size is limited
to SSIZE_T_MAX, which would be half the current maximum
innodb_log_buffer_size. This should be not much of an issue anyway,
because on contemporary 64-bit platforms, the virtual addresses are
limited to 48 bits.

IBM AIX documentation mentions OFF_MAX which would apply when
a 64-bit application is running on a 32-bit kernel.

Let us declare innodb_log_buffer_size as 32-bit unsigned and make the
maximum 0x7ffff000, to be compatible with the least common
denominator (Linux).

The maximum innodb_sort_buffer_size already was 64 MiB,
which is not a problem.

SyncFileIO::execute(): Assert that the size of a synchronous read or
write request is limited to the maximum.

Reviewed by: Vladislav Vaintroub

fcd345d... by Rucha Deodhar <email address hidden>

MDEV-32726: Fix failing test fir freebsd for json

Json test about max statement time fails with freebsd because on some
architectures the test might execute faster and the statement may not fail.

To simulate failure regardless of architecture, introduce a wait of seconds
longer than the max_statement_time.

188c5da... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-32453 Bulk insert fails to apply when trigger does insert operation

Reason:
=======
- InnoDB fails to apply the buffered insert operation if the
after insert trigger does change the same table. This behaviour
leads to empty table for the subsequent insert operation
and server abort.

Solution:
========
- InnoDB should apply buffered insert operation if
"after insert" trigger changes the same table.

5357110... by Tony Chen <email address hidden>

Fix error behaviour in mini-benchmark

In commit f5ca4077, an the "--log" option was added but it was implemented by
invoking a sub-shell. Any errors in the sub-shell would not be propagated and
thus cause mini-benchmark to suppress errors.

The fix here is to propagate the exit status of the sub-shell.

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.

2b0e073... by Tony Chen <email address hidden>

Add cpu-limit option for mini-benchmark

As performance improves, the permitted number of CPU cycles to be used
during the benchmark should be lowered to catch performance regressions. An
option is added to better support this.

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.

af4df93... by midenok

Columnstore empty submodule fix 2

Original problem was error when configuring without initialized
submodule Columnstore:

  The source directory

    /home/midenok/src/mariadb/10.6c/src/storage/columnstore/columnstore

  does not contain a CMakeLists.txt file.

The original fix disabled Columnstore build when PLUGIN_COLUMNSTORE
was not defined, but this seems to be wrong and any plugin should be
built if it is not explicitly disabled. This is expected by buildbots.

Thanks to Vladislav Vaintroub <email address hidden> for the fix

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

MDEV-33787 : Fix Galera test failures on 10.11