maria:bb-10.6-MDEV-32633-galera

Last commit made on 2024-05-14
Get this branch:
git clone -b bb-10.6-MDEV-32633-galera https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-MDEV-32633-galera
Repository:
lp:maria

Recent commits

fc18b88... by Denis Protivensky <email address hidden>

MDEV-32633: Fix Galera cluster <-> native replication interaction

It's possible to establish Galera multi-cluster setups connected
through the native replication when every Galera cluster is configured
to have a separate domain ID.
For this setup to work, we need to replace domain ID values in generated
GTID events when they are written at transaction commit to the values
configured by Wsrep replication.

At the same time, it's possible that the GTID event already contains
a correct domain ID if it comes through the native replication from
another Galera cluster.
In this case, when such an event is applied either through a native
replication slave thread or through Wsrep applier, we write GTID event
on transaction start and avoid writing it during transaction commit.

The code contained multiple problems that were fixed:
- applying GTID events didn't work because it's applied without a
running server transaction and Wsrep transaction was not started
- GTID event generation on transaction start didn't contain proper
"standalone" and "is_transactional" flags that the original applied
GTID event contained
- condition determining that GTID event is written on transaction start
to avoid writing it on commit relied on the fact that the GTID event
is the first found in transaction/statement caches, which wasn't the
case and resulted in duplicate GTID events written
- instead of relying on the caches to find a GTID event, a simple check
is introduced that follows the exact rules for checking if event is
written at transaction start as described above
- the test case is improved to check that exact GTID events are
applied after two Galera clusters have synced.

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

5e6c122... by Dmitry Shulga <email address hidden>

MDEV-33769: Memory leak found in the test main.rownum run with --ps-protocol against a server built with the option -DWITH_PROTECT_STATEMENT_MEMROOT

A memory leak happens on the second execution of a query that run in PS mode
and uses the function ROWNUM().

A memory leak took place on allocation of an instance of the class Item_int
for storing a limit value that is performed at the function set_limit_for_unit
indirectly called from JOIN::optimize_inner. Typical trace to the place where
the memory leak occurred is below:
 JOIN::optimize_inner
  optimize_rownum
   process_direct_rownum_comparison
    set_limit_for_unit
     new (thd->mem_root) Item_int(thd, lim, MAX_BIGINT_WIDTH);

To fix this memory leak, calling of the function optimize_rownum()
has to be performed only once on first execution and never called
after that. To control it, the new data member
  first_rownum_optimization
added into the structure st_select_lex.

6bf2b64... by Marko Mäkelä

MDEV-34118 fsp_alloc_free_extent() fails to flag DB_OUT_OF_FILE_SPACE

fsp_alloc_free_extent(): When applicable, set *err = DB_OUT_OF_FILE_SPACE.

887bb3f... by Sergei Golubchik

columnstore 6.4.8-2

7b53672... by Sergei Golubchik

Merge branch '10.5' into 10.6

29c185b... by Sergei Golubchik

test needs to cleanup after itself

938b929... by Sergei Golubchik

don't wait indefinitely for signal handler in --bootstrap

FreeBSD doesn't like it and hangs.

As we don't wait for signal handler, let's disable SIGHUP in bootstrap
too

360a7ff... by Sergei Golubchik

fix tests after 349ca2be7437

.opt files, unlike combinations, accumulate, let's not overuse them

1c425a8... by Sergei Golubchik

MDEV-33727 update test results

followup for 13663cb5c455

30d3cfa... by Sergei Golubchik

new C/C 3.3