maria:bb-10.3-midenok-MDEV-25004

Last commit made on 2022-07-01
Get this branch:
git clone -b bb-10.3-midenok-MDEV-25004 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.3-midenok-MDEV-25004
Repository:
lp:maria

Recent commits

d757cd7... by midenok

MDEV-25004 innodb_fts.versioning upgrade/downgrade test for system versioning

OLD_BINDIR must point to previous revision build for this test to work
correctly (see comment in versioning.test).

423499b... by midenok

MDEV-25004 restart_bindir option to restart server from different location

Adds new parameter $restart_bindir for restart_mysqld.inc.

Example:

let $restart_bindir= /home/midenok/src/mariadb/10.3b/build;
--source include/restart_mysqld.inc

It is good to return back original server before check_mysqld will be
run at the test end:

let $restart_bindir=;
--source include/restart_mysqld.inc

db1ba75... by midenok

MDEV-25004 FTS tests for System Versioning

MTR combination 'vers' for debug build sets sysvers_force and
sysvers_hide. sysvers_force makes every created table
system-versioned, sysvers_hide hides WITH SYSTEM VERSIONING for SHOW
CREATE.

MTR combination 'vers_trx' like 'vers' sets sysvers_force_trx and
sysvers_hide. That tests FTS with trx_id-based System Versioning.

To use 'vers' or 'vers_trx' combination one must include
maybe_versioning.inc into his test.

Removed innodb-fts-stopword.test as it duplicates stopword.test

fb47e87... by midenok

MDEV-25004 vers_force_trx option to force transactional System Versioning

Works like vers_force but forces trx_id-based system-versioned tables
if the storage supports it (currently InnoDB-only). Otherwise creates
timestamp-based system-versioned table.

003d42a... by midenok

MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY

1. In case of system-versioned table add row_end into FTS_DOC_ID index
   in fts_create_common_tables() and innobase_create_key_defs().
   fts_n_uniq() returns 1 or 2 depending on whether the table is
   system-versioned.

   After this patch recreate of FTS_DOC_ID index is required for
   existing system-versioned tables. If you see this message in error
   log or server warnings: "InnoDB: Table db/t1 contains 2 indexes
   inside InnoDB, which is different from the number of indexes 1
   defined in the MariaDB" use this command to fix the table:

      ALTER TABLE db.t1 FORCE;

2. Fix duplicate history for secondary unique index like it was done
   in MDEV-23644 for clustered index (932ec586aad). In case of
   existing history row which conflicts with currently inseted row we
   check in row_ins_scan_sec_index_for_duplicate() whether that row
   was inserted as part of current transaction. In that case we
   indicate with DB_FOREIGN_DUPLICATE_KEY that new history row is not
   needed and should be silently skipped.

3. Some parts of MDEV-21138 (7410ff436e9) reverted. Skipping of
   FTS_DOC_ID index for history rows made problems with purge
   system. Now this is fixed differently by p.2.

4. wait_all_purged.inc checks that we didn't affect non-history rows
   so they are deleted and purged correctly.

Additional FTS fixes

  fts_init_get_doc_id(): exclude history rows from max_doc_id
  calculation. fts_init_get_doc_id() callback is used only for crash
  recovery.

  fts_add_doc_by_id(): set max value for row_end field.

  fts_read_stopword(): stopwords table can be system-versioned too. We
  now read stopwords only for current data.

  row_insert_for_mysql(): exclude history rows from doc_id validation.

  row_merge_read_clustered_index(): exclude history_rows from doc_id
  processing.

  fts_load_user_stopword(): for versioned table retrieve row_end field
  and skip history rows. For non-versioned table we retrieve 'value'
  field twice (just for uniformity).

3e09c61... by Julius Goryavsky <email address hidden>

MDEV-26562: galera-sst-mariabackup is failing due to missing xtrabackup_checkpoints

This commit contains workaround for a bug known as 'Red Hat issue 1870279'
(connection reset by peer issue in socat versions 1.7.3.3 to 1.7.4.0) which
further causes crashes during SST using mariabackup (when openssl is used).

Also fixed broken logic of automatic generation of the Diffie-Hellman parameters
for socat version less than 1.7.3 (which defaults to 512-bit values instead of
2048-bit ones).

d453942... by Daniel Black

MDEV-28884: include kernel information in crashing signal handler

Recent adventures in liburing and btrfs have shown up some kernel
version dependent bugs. Having a bug report of accurace kernel version
can start to correlate these errors sooner.

On Linux, /proc/version contains the kernel version.

FreeBSD has kern.version (per man 8 sysctl), so include that too.

Example output:

Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h

Kernel version: Linux version 5.19.0-0.rc2.21.fc37.x86_64 (<email address hidden>) (gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1), GNU ld version 2.38-14.fc37) #1 SMP PREEMPT_DYNAMIC Mon Jun 13 15:27:24 UTC 2022

Segmentation fault (core dumped)

f299351... by Sergei Golubchik

remove invalid test

it starts an EXPLAIN of a multi-table join and tries to KILL it.
no sync points.
depending on how fast the hareware is and optimizer development
it might kill EXPLAIN at some random point in time (generally unrelated
to the Bug#28598 it was supposed to test) or EXPLAIN might finish
before the KILL and the test will fail.

be99d0d... by Marko Mäkelä

Fix intermittent failures of innodb.stats_persistent

We do not really care about the exact result; we only care that the
statistics will be accessed. The result could change depending on
when some statistics were updated in the background or when some
committed delete-marked rows were purged from other tables on
which persistent statistics are enabled.

c4f65d8... by Shunsuke Tokunaga <email address hidden>

MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed in ha_partition::set_auto_increment_if_higher

ha_partition::set_auto_increment_if_higher expects
part_share->auto_inc_initialized is true or can_use_for_auto_inc_init()
is false (but as the comment of this method says, it returns false
only if we use Spider engine with DROP TABLE or ALTER TABLE query).
However, part_share->auto_inc_initialized becomes true only after all
partitions are opened (since 6dce6aecebe6ef78a14cb5c5c5daa8a355551e40).

Therefore, I added a conditional expression in order to read all
partitions when we execute REPLACE on a table that has an
AUTO_INCREMENT column.

Reviewed by: Nayuta Yanagisawa
Reviewed by: Alexey Botchkov