maria:10.5-MDEV-19165

Last commit made on 2020-08-06
Get this branch:
git clone -b 10.5-MDEV-19165 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
10.5-MDEV-19165
Repository:
lp:maria

Recent commits

820b0f2... by Julius Goryavsky <email address hidden>

MDEV-19165: EVENT can be on all nodes after Galera SST

This patch fixes a bug related to the fact that after
restarting the Galera node that created the event, it
has the erroneous status of SLAVESIDE_DISABLED instead
of ENABLED on this node.

054f103... by Marko Mäkelä

Merge 10.4 into 10.5

3280edd... by Marko Mäkelä

Merge 10.3 into 10.4

73aa31f... by Marko Mäkelä

Merge 10.2 into 10.3

147d4b1... by Marko Mäkelä

MDEV-21347 innodb_log_optimize_ddl=OFF is not crash safe

In commit 0f90728bc0f8bc946a61500801b23f8a316e73d5 (MDEV-16809)
we introduced the configuration option innodb_log_optimize_ddl
for controlling whether native index creation or table-rebuild
in InnoDB should avoid writing full redo log.

Fungo Wang reported that this option is causing occasional failures.
The reason is that pages may be written to data files in an
inconsistent state. Applying log records to such inconsistent pages
may fail.

The solution is to always invoke PageBulk::finish() before page latches
may be released, to ensure that the page contents is in a consistent
state.

Something similar was implemented in MySQL 8.0.13:
mysql/mysql-server@d1254b947354e0f5b7223b09c521bd85f22e1e31

buf_block_t::skip_flush_check: Remove. Suppressing consistency checks
is a bad idea.

PageBulk::needs_finish(): New predicate: Determine whether
PageBulk::finish() must fix up the page.

PageBulk::init(): Clear PAGE_DIRECTION to ensure that needs_finish()
will hold. We change the field from PAGE_NO_DIRECTION to 0
and back without writing redo log. This trick avoids the need
to introduce any new data member to PageBulk.

PageBulk::insert(): Replace some high-level accessors to bypass
debug assertions related to PAGE_HEAP_TOP that we will be violating
until finish() has been executed.

PageBulk::finish(): Tolerate m_rec_no==0. We must invoke this also
on an empty page, to ensure that PAGE_HEAP_TOP is initialized.

PageBulk::commit(): Always invoke finish().

PageBulk::release(), BtrBulk::pageSplit(), BtrBulk::storeExt(),
BtrBulk::finish(): Invoke PageBulk::finish().

fee11c7... by Marko Mäkelä

Make page validation stricter

page_simple_validate_old(), page_simple_validate_new():
Require PAGE_N_DIR_SLOTS to be at least 2.

38b4c07... by Marko Mäkelä

MDEV-23183 Infinite loop on page_validate() on corrupted page

MDEV-22721 (commit eba2d10ac53d1d2f975027ba2b2ca39d9c9b98ad)
inadvertently introduced an infinite loop.

page_validate(): Remove the infinite loop.

20512a6... by Daniel Black

MDEV-23175: my_timer_milliseconds ftime deprecated - clock_gettime replacement

Linux glibc has deprecated ftime resutlting in a compile error on Fedora-32.

Per manual clock_gettime is the suggested replacement. Because my_timer_milliseconds
is a relative time used by largely the perfomrance schema, CLOCK_MONOTONIC_COARSE
is used. This has been available since Linux-2.6.32.

The low overhead is shows in the unittest:

    $ unittest/mysys/my_rdtsc-t
    1..11
    # ----- Routine ---------------
    # myt.cycles.routine : 5
    # myt.nanoseconds.routine : 11
    # myt.microseconds.routine : 13
    # myt.milliseconds.routine : 18
    # myt.ticks.routine : 17
    # ----- Frequency -------------
    # myt.cycles.frequency : 3596597014
    # myt.nanoseconds.frequency : 1000000000
    # myt.microseconds.frequency : 1000000
    # myt.milliseconds.frequency : 1039
    # myt.ticks.frequency : 103
    # ----- Resolution ------------
    # myt.cycles.resolution : 1
    # myt.nanoseconds.resolution : 1
    # myt.microseconds.resolution : 1
    # myt.milliseconds.resolution : 1
    # myt.ticks.resolution : 1
    # ----- Overhead --------------
    # myt.cycles.overhead : 118
    # myt.nanoseconds.overhead : 234
    # myt.microseconds.overhead : 222
    # myt.milliseconds.overhead : 30
    # myt.ticks.overhead : 4946
    ok 1 - my_timer_init() did not crash
    ok 2 - The cycle timer is strictly increasing
    ok 3 - The cycle timer is implemented
    ok 4 - The nanosecond timer is increasing
    ok 5 - The nanosecond timer is implemented
    ok 6 - The microsecond timer is increasing
    ok 7 - The microsecond timer is implemented
    ok 8 - The millisecond timer is increasing
    ok 9 - The millisecond timer is implemented
    ok 10 - The tick timer is increasing
    ok 11 - The tick timer is implemented

e67daa5... by Marko Mäkelä

Merge 10.4 into 10.5

9c8420f... by Vladislav Vaintroub

Fix compile warning