maria:bb-10.5-MDEV-20051

Last commit made on 2020-02-11
Get this branch:
git clone -b bb-10.5-MDEV-20051 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-MDEV-20051
Repository:
lp:maria

Recent commits

df84c81... by Jan Lindström

Fix typo.

c888f52... by Jan Lindström

MDEV-20051: Add new mode to wsrep_OSU_method in which Galera checks storage engine of the effected table

Introduced a new wsrep_strict_ddl configuration variable in which
Galera checks storage engine of the effected table. If table is not
InnoDB (only storage engine currently fully supporting Galera
replication) DDL-statement will return error code:

ER_GALERA_REPLICATION_NOT_SUPPORTED
       eng "DDL-statement is forbidden as table storage engine does not support Galera replication"

However, when wsrep_replicate_myisam=ON we allow DDL-statements to
MyISAM tables. If effected table is allowed storage engine Galera
will run normal TOI.

This new setting should be for now set globally on all
nodes in a cluster. When this setting is set following DDL-clauses
accessing tables not supporting Galera replication are refused:

* CREATE TABLE (e.g. CREATE TABLE t1(a int) engine=Aria
* ALTER TABLE
* TRUNCATE TABLE
* CREATE VIEW
* CREATE TRIGGER
* CREATE INDEX
* DROP INDEX
* RENAME TABLE
* DROP TABLE

Statements on PROCEDURE, EVENT, FUNCTION are allowed as effected
tables are known only at execution. Furthermore, USER, ROLE, SERVER,
DATABASE statements are also allowed as they do not really have
effected table.

0d1ca19... by Marko Mäkelä

One more fixup for sizeof(mtr_t) reduction

Add explicit casts when assigning ulint to m_user_space_id.

91e7b44... by Marko Mäkelä

mtr_t::get_log_mode(): Remove a redundant assertion

mtr_log_t and mtr_t::m_log_mode have the same range 0 to 3.

2b260f2... by Marko Mäkelä

Fixup the parent commit

mtr_t::get_log_mode(): Use equivalent static_assert().

mtr_t::m_n_log_recs: Do not exceed the number of bits in uint16_t.

9a99946... by Marko Mäkelä

Cleanup: Recude sizeof(mtr_t)

Use bit-fields for some mtr_t members to improve locality of reference.
Because mtr_t is never shared between threads, there are no considerations
regarding concurrent access.

8b6cfda... by Marko Mäkelä

Merge 10.4 into 10.5

8b97eba... by Marko Mäkelä

MDEV-21674 purge_sys.stop() fails to wait for purge workers to complete

Since commit 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02 (MDEV-16264),
purge_sys_t::stop() no longer waited for all purge activity to stop.

This caused problems on FLUSH TABLES...FOR EXPORT because of
purge running concurrently with the buffer pool flush.
The assertion at the end of buf_flush_dirty_pages() could fail.

The, implemented by Vladislav Vaintroub, aims to eliminate race
conditions when stopping or resuming purge:

waitable_task::disable(): Wait for the task to complete, then replace
the task callback function with noop.

waitable_task::enable(): Restore the original task callback function
after disable().

purge_sys_t::stop(): Invoke purge_coordinator_task.disable().

purge_sys_t::resume(): Invoke purge_coordinator_task.enable().

purge_sys_t::running(): Add const qualifier, and clarify the comment.
The purge coordinator task will remain active as long as any purge
worker task is active.

purge_worker_callback(): Assert purge_sys.running().

srv_purge_wakeup(): Merge with the only caller purge_sys_t::resume().

purge_coordinator_task: Use static linkage.

cd3bdc0... by Marko Mäkelä

MDEV-18582: Fix a race condition

srv_export_innodb_status(): While gathering
innodb_mem_adaptive_hash, acquire btr_search_latches[i]
in order to prevent a race condition with buffer pool resizing.

6d21441... by Marko Mäkelä

MDEV-21351: Free processed recv_sys_t::blocks

Release memory as soon as redo log records are processed.

Because the memory allocation and deallocation of parsed redo log
records must be protected by recv_sys.mutex, it is better to avoid
using a std::atomic field for bookkeeping.

buf_page_t::access_time: Keep track of the recv_sys.pages record
allocations. The most significant 16 bits will count allocated
blocks (which were previously counted by buf_page_t::buf_fix_count
in the debug version), and the least significant 16 bits indicate
the number of allocated bytes in the block (which was previously
managed in buf_block_t::modify_clock), which must be a positive
number, up to innodb_page_size. The byte offset 65536 is represented
as the value 0.

recv_recover_page(): Let the caller erase the log.

recv_validate_tablespace(): Acquire recv_sys_t::mutex.