maria:bb-10.5-bar-MDEV-33342

Last commit made on 2024-02-01
Get this branch:
git clone -b bb-10.5-bar-MDEV-33342 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-bar-MDEV-33342
Repository:
lp:maria

Recent commits

904fe1f... by Alexander Barkov

Add a replication MTR test cloning the slave with mariadb-backup

Part2: adding a test for Galera->MariaDB replication

8fbad58... by Alexander Barkov

MDEV-33342 Add a replication MTR test cloning the slave with mariadb-backup

68c1fbf... by Nikita Malyavin

MDEV-25370 Update for portion changes autoincrement key in bi-temp table

According to the standard, the autoincrement column (i.e. *identity
column*) should be advanced each insert implicitly made by
UPDATE/DELETE ... FOR PORTION.

This is very unconvenient use in several notable cases. Concider a
WITHOUT OVERLAPS key with an autoinc column:
id int auto_increment, unique(id, p without overlaps)

An update or delete with FOR PORTION creates a sense that id will remain
unchanged in such case.

The standard's IDENTITY reminds MariaDB's AUTO_INCREMENT, however
the generation rules differ in many ways. For example, there's also a
notion autoincrement index, which is bound to the autoincrement field.

We will define our own generation rule for the PORTION OF operations
involving AUTO_INCREMENT:
* If an autoincrement index contains WITHOUT OVERLAPS specification, then
a new value should not be generated, otherwise it should.

Apart from WITHOUT OVERLAPS there is also another notable case, referred
by the reporter - a unique key that has an autoincrement column and a field
from the period specification:
  id int auto_increment, unique(id, s), period for p(s, e)

for this case, no exception is made, and the autoincrementing rules will be
proceeded accordung to the standard (i.e. the value will be advanced on
implicit inserts).

21f18bd... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-33341 innodb.undo_space_dblwr test case fails with Unknown Storage Engine InnoDB

Reason:
======
undo_space_dblwr test case fails if the first page of undo
tablespace is not flushed before restart the server. While
restarting the server, InnoDB fails to detect the first
page of undo tablespace from doublewrite buffer.

Fix:
===
Use "ib_log_checkpoint_avoid_hard" debug sync point
to avoid checkpoint and make sure to flush the
dirtied page before killing the server.

innodb_make_page_dirty(): Fails to set
srv_fil_make_page_dirty_debug variable.

6914b78... by Tuukka Pasanen <email address hidden>

MDEV-32935: Remove unneeded CMAKE_SYSTEM_PROCESSOR parameter from Debian

There is no need for CMAKE_SYSTEM_PROCESSOR parameter in Debian
build as dh_auto_configure should handle things better and
more reliable

354e97c... by VladislavVaintroub

Fix mtr for builds without perfschema.

97fcafb... by Alexander Barkov

MDEV-32837 long unique does not work like unique key when using replace

write_record() when performing REPLACE has an optimization:
- if the unique violation happened in the last unique key, then do UPDATE
- otherwise, do DELETE+INSERT

This patch changes the way of detecting if this optimization
can be applied if the table has long (hash based) unique
(i.e. UNIQUE..USING HASH) constraints.

Problem:

The old condition did not take into account that
TABLE_SHARE and TABLE see long uniques differently:
- TABLE_SHARE sees as HA_KEY_ALG_LONG_HASH and HA_NOSAME
- TABLE sees as usual non-unique indexes
So the old condition could erroneously decide that the UPDATE optimization
is possible when there are still some unique hash constraints in the table.

Fix:

- If the current key is a long unique, it now works as follows:

  UPDATE can be done if the current long unique is the last
  long unique, and there are no in-engine (normal) uniques.

- For in-engine uniques nothing changes, it still works as before:

  If the current key is an in-engine (normal) unique:
  UPDATE can be done if it is the last normal unique.

a7ee3bc... by Sergei Golubchik

MDEV-29954 Unique hash key on column prefix is computed incorrectly

use the original, not the truncated, field in the long unique prefix,
that is, in the hash(left(field, length)) expression.

because MyISAM CHECK/REPAIR in compute_vcols() moves table->field
but not prefix fields from keyparts.

Also, implement Field_string::cmp_prefix() for prefix comparison
of CHAR columns to work.

14d00fd... by Sergei Golubchik

cleanup: MY_STRNNCOLLSP_NCHARS_EMULATE_TRIMMED_TRAILING_SPACES

no need to use it when both arguments have the same length

8bb4648... by Sergei Golubchik

cleanup: unused and undefined methods