maria:bb-10.3-MDEV-30157-galera

Last commit made on 2022-12-29
Get this branch:
git clone -b bb-10.3-MDEV-30157-galera https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.3-MDEV-30157-galera
Repository:
lp:maria

Recent commits

6b8528c... by Julius Goryavsky <email address hidden>

MDEV-28669 addendum: additional tests and mtr changes

This commit contains additions to mtr:

1) Running .sh scripts (which can be executed before running
   the test) moved to an earlier stage so that they can create
   directories or perform other useful actions before the boostrap
   phase of the test;
2) Changes have been added that allow the user to set a custom
   location for datadir during a test, both as an option on the
   command line and via a configuration parameter - so that tests
   can be created that use a custom datadir location, and also
   check work with this parameter;
3) Added more precise filters for options that require a new
   bootstrap with rebuilding the database before starting the test;
4) Now mtr sets an environment variable MTR_BOOTSTRAP_OPTS_<suffix>
   that can be used in scripts if these scripts need to know with
   what additional bootstrap parameters was used when server was
   started - which is relevant for those tests that require individual
   bootstrap and then re-start server from within - these tests need
   to know what additional the parameters must be passed to the
   server (except for those specific to this particular text itself),
   for example, this facilitates the launch of tests for galera
   recovery.

This commit also contains tests for Galera: for MDEV-28669,
MDEV-30157, MDEV-30220, MDEV-29591, which depend on the presence
of the above changes in mtr and are themselves a check for these
changes.

bf910f3... by Julius Goryavsky <email address hidden>

MDEV-30220: rsync SST completely ignores aria-log-dir-path

This commit adds support for the --aria-log-dir-path
option on the command line and for the aria-log-dir-path
option in the configuration file to the SST scripts, since
before this change these parameters were completely ignored
during SST - SST scripts assumed that aria logs files are
always located in the same directory as logs for innodb.

Tests for this change will be added as a separate commit,
along with tests for MDEV-30157 and MDEV-28669.

dcca4fd... by Julius Goryavsky <email address hidden>

MDEV-30157: Galera SST doesn't properly handle undo* files from innodb

This fix adds separate handling for "undo*" files that contain undo
logs as part of innodb files and adds a filter for undo* to the main
filter used when initially transferring files with rsync.

c52dbf6... by Julius Goryavsky <email address hidden>

pre-MDEV-30157 & pre-MDEV-28669: fixes before the main corrections

This commit adds even more correct handling of parameters
with paths if they contain leading or trailing spaces, and
also fixes problems if the user specified an explicit path
to additional directories, but these directories match the
non-standard datadir path - in this In this case, additional
subdirectories must be treated (in relation to datadir) as
if the path was not specified or implicitly specified via
"." or "./", but the script code before this fix worked
as if the user had specified separate paths for each of
the additional subdirectories (although in fact they
point to the same place where datadir points).

This fix does not contain separate tests, as tests will
be part of the main commit(s). This fix has been made as
a separate commit to facilitate review for major substantive
fixes related to MDEV-30157 and MDEV-28669.

6710fe4... by Julius Goryavsky <email address hidden>

MDEV-30293: mariabackup fail with --galera-info option without Galera

Without Galera, mariabackup should ignore the --galera-info option
and not fail with rc != 0 like it does now. This commit fixes this flaw.

72e2d1d... by Marko Mäkelä

MDEV-25004 Refactorings

  * Avoid some pessimization
  * Slightly smaller upgrade dataset
  * Simplify vers_row_same_trx() and its caller

e056efd... 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).

FTS tests for System Versioning now include maybe_versioning.inc which
adds 3 combinations:

'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.

    Note: basic.test, stopword.test and versioning.test do not
    require debug for 'vers' combination. This is controlled by
    $modify_create_table in maybe_versioning.inc and these
    tests run WITH SYSTEM VERSIONING explicitly which allows to
    test 'vers' combination on non-debug builds.

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

'orig' works like before: no System Versioning is added, no debug is
    required.

Upgrade/downgrade test for System Versioning is done by
innodb_fts.versioning. It has 2 combinations:

'prepare' makes binaries in std_data (requires old server and OLD_BINDIR).
   It tests upgrade/downgrade against old server as well.

'upgrade' tests upgrade against binaries in std_data.

Cleanups:

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

68c437b... 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

5d506ac... 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.

7c5609f... by musvaage <email address hidden>

typos