maria:bb-10.4-MDEV-22494

Last commit made on 2020-05-14
Get this branch:
git clone -b bb-10.4-MDEV-22494 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-MDEV-22494
Repository:
lp:maria

Recent commits

3e4a804... by Jan Lindström

MDEV-22494 : Galera assertion lock_sys.mutex.is_owned() at lock_trx_handle_wait_low

Problem was that trx->lock.was_chosen_as_wsrep_victim variable was
not set back to false after it was set true.

wsrep_thd_bf_abort
 Add assertions for correct mutex status and take necessary
 mutexes before calling thd->awake_no_mutex().

innobase_rollback_trx()
 Reset trx->lock.was_chosen_as_wsrep_victim

wsrep_abort_slave_trx()
 Removed unused function.

wsrep_innobase_kill_one_trx()
 Added function comment, removed unnecessary parameters
 and added debug assertions to enforce correct usage. Added
 more debug output to help out on error analysis.

wsrep_abort_transaction()
 Added debug assertions and removed unused variables.

trx0trx.h
 Removed assert_trx_is_free macro and replaced it with
 assert_freed() member function.

trx_create()
 Use above assert_free() and initialize wsrep variables.

trx_free()
 Use assert_free()

trx_t::commit_in_memory()
 Reset lock.was_chosen_as_wsrep_victim

trx_rollback_for_mysql()
 Reset trx->lock.was_chosen_as_wsrep_victim

Add test case galera_bf_kill

38f6c47... by Marko Mäkelä

Merge 10.3 into 10.4

15fa70b... by Marko Mäkelä

Merge 10.2 into 10.3

6bc4444... by Marko Mäkelä

Merge 10.1 into 10.2

9f20968... by Alexander Barkov

MDEV-20261 NULL passed to String::eq, SEGV, server crash, regression in 10.4

Type_handler_xxx::Item_const_eq() can handle only non-NULL values.
The code in Item_basic_value::eq() did not take this into account.

Adding a test to detect three different combinations:
- Both values are NULLs, return true.
- Only one value is NULL, return false.
- Both values are not NULL, call Type_handler::Item_const_eq()
  to check equality.

218d20f... by Vlad Lesin

MDEV-22398: mariabackup.innodb_xa_rollback fails on repeat

Flush LSN to system tablespace on innodb shutdown if XA is rolled back by
mariabackup.

0e6a578... by Marko Mäkelä

Cleanup: Remove InnoDB wrappers of thd_charset(), thd_query_safe()

innobase_get_charset(), innobase_get_stmt_safe(): Remove.
It is more efficient and readable to invoke thd_charset()
and thd_query_safe() directly, without a non-inlined wrapper function.

a2560b0... by Marko Mäkelä

MDEV-22529 thd_query_safe() isn’t, causing InnoDB to hang

The function thd_query_safe() is used in the implementation of the
following INFORMATION_SCHEMA views:

    information_schema.innodb_trx
    information_schema.innodb_locks
    information_schema.innodb_lock_waits
    information_schema.rocksdb_trx

The implementation of the InnoDB views is in trx_i_s_common_fill_table().
This function invokes trx_i_s_possibly_fetch_data_into_cache(),
which will acquire lock_sys->mutex and trx_sys->mutex in order to
protect the set of active transactions and explicit locks.
While holding those mutexes, it will traverse the collection of
InnoDB transactions. For each transaction, thd_query_safe() will be
invoked.

When called via trx_i_s_common_fill_table(), thd_query_safe()
is acquiring THD::LOCK_thd_data while holding the InnoDB locks.
This will cause a deadlock with THD::awake() (such as executing
KILL QUERY), because THD::awake() could invoke lock_trx_handle_wait(),
which attempts to acquire lock_sys->mutex while already holding
THD::lock_thd_data.

thd_query_safe(): Invoke mysql_mutex_trylock() instead of
mysql_mutex_lock(). Return the empty string if the mutex
cannot be acquired without waiting.

db537a8... by Oleksandr "Sanja" Byelkin

Merge branch '10.4-release' into 10.4

19d4e02... by Oleksandr "Sanja" Byelkin

Merge branch '10.3-release' into 10.3