maria:bb-10.5-MDEV-31062-galera

Last commit made on 2023-09-25
Get this branch:
git clone -b bb-10.5-MDEV-31062-galera https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-MDEV-31062-galera
Repository:
lp:maria

Recent commits

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

MDEV-31062 : Reduce number of wsrep calls to server code from InnoDB

Thread executing wsrep transaction can't change during transaction
execution. Similarly, thread executing high priority brute force
(BF) transaction does not change during transaction execution.
Therefore, in both cases there is no need to call server
code after transaction has initialized.

InnoDB already stores information is this wsrep transaction to
trx_t::wsrep and this is checked using trx->is_wsrep() function.
Because, brute force transaction is always a wsrep transaction
we can extend trx_t::wsrep variable so that value

0 == not wsrep transaction (and not BF)
1 == normal wsrep transaction
2 == high priority BF wsrep transaction
4 == high priority BF transaction is performing unique secondary index scan

These values can be set by calling server code on innobase_trx_init().
After that we can use trx_t::is_wsrep() and new function
introduced in this patch trx_t::is_wsrep_BF(). Unique
secondary index scan is determined later but it implies BF,
so this patch removes unnecessary variable trx_t::wsrep_UK_scan.
Patch introduces new functions trx_t::is_wsrep_UK_scan(),
wsrep_begin_UK_scan() and wsrep_end_UK_scan() to handle
unique secondary index scan.

This change reduces number of calls to server code from InnoDB and
reduces code bloat on performance critical stages like acquiring
record locks. Furthermore, it simplifies code on several locations.

This patch also removes unnecessary trx_t::wsrep_event that
was always set to NULL and not used.

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

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

MDEV-29775 : Assertion `0' failed in void Protocol::end_statement() when adding data to the MyISAM table after setting wsrep_mode=replicate_myisam

Firstly, variables wsrep_forced_binlog_format, wsrep_replicate_myisam
should not be able to set if wsrep_on=OFF.

Secondly, if wsrep_replicate_myisam=ON we allow wsrep_forced_binlog_format
to be [DEFAULT|ROW].

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

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

MDEV-25731 : Assertion `mode_ == m_local' failed in void wsrep::client_state::streaming_params(wsrep::streaming_context::fragment_unit, size_t)

Problem was that if wsrep_load_data_splitting was used
streaming replication (SR) parameters were set
for MyISAM table. Galera does not currently support SR for
MyISAM.

Fix is to ignore wsrep_load_data_splitting setting (with
warning) if table is not InnoDB table.

This fix applies to 10.4-10.5.

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

6b343de... by Yuchen Pei <email address hidden>

Merge branch '10.4' into 10.5

b6773f5... by Yuchen Pei <email address hidden>

MDEV-31936 Simplify deinit_spider.inc

Spider is part of the server, and there's no need to check the
version.

All spider plugins are uninstalled in clean_up_spider.inc

DROP SERVER IF EXISTS makes things easier

ab9b146... by Igor Babaev

MDEV-32225 Test case from opt_tvc.test fails with statement memory protection

Memory for type holders of the columns of a table value constructor must
be allocated only once.

Approved by Oleksandr Byelkin <email address hidden>

1ee0d09... by VladislavVaintroub

MDEV-32228 speedup opening tablespaces on Windows

is_file_on_ssd() is more expensive than it should be.
It caches the results by volume name, but still calls GetVolumePathName()
every time, which, as procmon shows, opens multiple directories in
filesystem hierarchy (db directory, datadir, and all ancestors)

The fix is to cache SSD status by volume serial ID, which is cheap to
retrieve with GetFileInformationByHandleEx()

89a493d... by Oleksandr "Sanja" Byelkin

MDEV-31742 incorrect examined rows in case of stored function usage

The counter is global so we do not need add backup to it
if we do not zero it after taking the backup.

2bf291b... by Oleksandr "Sanja" Byelkin

MDEV-30820 slow log Rows_examined out of range

Fix row counters to be able to get any possible value.

9573037... by Vlad Lesin

MDEV-30165 X-lock on supremum for prepared transaction for RR

trx_t::set_skip_lock_inheritance() must be invoked at the very beginning
of lock_release_on_prepare(). Currently trx_t::set_skip_lock_inheritance()
is invoked at the end of lock_release_on_prepare() when lock_sys and trx
are released, and there can be a case when locks on prepare are released,
but "not inherit gap locks" bit has not yet been set, and page split
inherits lock to supremum.

Also reset supremum bit and rebuild waiting queue when XA is prepared.

Reviewed by: Marko Mäkelä