maria:bb-10.2-MDEV-277400

Last commit made on 2022-02-03
Get this branch:
git clone -b bb-10.2-MDEV-277400 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.2-MDEV-277400
Repository:
lp:maria

Recent commits

c0f5fd2... by Sergei Golubchik

MDEV-27683 EXCHANGE PARTITION allows different index direction, but causes further errors

a450d58... by Sergei Golubchik

fix a copy-paste error

LEX_CSTRING table_name= { table->s->db.str, table->s->table_name.length };

and misc cleanups

e4d7886... by Andrei <email address hidden>

MDEV-11675. rpl_start_alter_ftwrl.test is refined

The test could fail sporadically because of not anticipated
race on slave between CREATE and ALTER queries.

Fixed to synchronize slave and master wrt CREATE.

12f29a4... by Marko Mäkelä

MDEV-11675 fixup: GCC -Og -Wmaybe-uninitialized

save_restore_context_apply_event(): Because compilers cannot infer
that ev->apply_event(rgi) will not affect ev->get_type_code(),
let us test that condition only once and allow the compiler to
emit a tail call.

Also, replace a goto with an early return for error handling.

2b95c36... by Vladislav Vaintroub

fix clang-cl warnings

83cdcf5... by Oleksandr "Sanja" Byelkin

new CC 3.3

2b55411... by Andrei <email address hidden>

MDEV-27687 Assertion `!thd->rgi_fake || ...

The added by MDEV-11675 assert is incorrected assuming
a replayed from binlog transaction can't contain invoke
a FD event's apply method.

In fact it can do that through BINLOG event.
The test case like

  BEGIN;
    INSERT INTO t1 VALUES(10);
    BINLOG '
    SOgWTg8BAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8=';

is provided (by yet to merged atm) MDEV-27536 fixes.

The assert is removed.

fe2d90c... by Andrei <email address hidden>

MDEV-11675. Convert the new session var to bool type and test changes

The new @@binlog_alter_two_phase is converted to `my_bool` type.

a64991d... by Brandon Nesterenko

MDEV-4989: Support for GTID in mysqlbinlog

This patch fixes two issues:

First, it fixes test failure due to GTID List events
having inconsistent ordering of domain ids. In
particular, this patch ensures that a GTID list log
event will have its GTIDs ordered by domain id
(ascending) followed by sequence number (ascending).

Second, it fixes an assert which could use an
unintialized variable.

Reviewed By:
============
Andrei Elkin <email address hidden>

0c5d134... by sachin

MDEV-11675 Lag Free Alter On Slave

This commit implements two phase binloggable ALTER.
When a new

      @@session.binlog_alter_two_phase = YES

ALTER query gets logged in two parts, the START ALTER and the COMMIT
or ROLLBACK ALTER. START Alter is written in binlog as soon as
necessary locks have been acquired for the table. The timing is
such that any concurrent DML:s that update the same table are either
committed, thus logged into binary log having done work on the old
version of the table, or will be queued for execution on its new
version.

The "COMPLETE" COMMIT or ROLLBACK ALTER are written at the very point
of a normal "single-piece" ALTER that is after the most of
the query work is done. When its result is positive COMMIT ALTER is
written, otherwise ROLLBACK ALTER is written with specific error
happened after START ALTER phase.
Replication of two-phase binloggable ALTER is
cross-version safe. Specifically the OLD slave merely does not
recognized the start alter part, still being able to process and
memorize its gtid.

Two phase logged ALTER is read from binlog by mysqlbinlog to produce
BINLOG 'string', where 'string' contains base64 encoded
Query_log_event containing either the start part of ALTER, or a
completion part. The Query details can be displayed with `-v` flag,
similarly to ROW format events. Notice, mysqlbinlog output containing
parts of two-phase binloggable ALTER is processable correctly only by
binlog_alter_two_phase server.

@@log_warnings > 2 can reveal details of binlogging and slave side
processing of the ALTER parts.

The current commit also carries fixes to the following list of
reported bugs:
MDEV-27511, MDEV-27471, MDEV-27349, MDEV-27628, MDEV-27528.

Thanks to all people involved into early discussion of the feature
including Kristian Nielsen, those who helped to design, implement and
test: Sergei Golubchik, Andrei Elkin who took the burden of the
implemenation completion, Sujatha Sivakumar, Brandon
Nesterenko, Alice Sherepa, Ramesh Sivaraman, Jan Lindstrom.