maria:bb-10.5-MDEV-25114

Last commit made on 2021-09-23
Get this branch:
git clone -b bb-10.5-MDEV-25114 https://git.launchpad.net/maria

Branch merges

Branch information

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

Recent commits

da9a37b... by sjaakola <email address hidden>

MDEV-25114 Crash: WSREP: invalid state ROLLED_BACK (FATAL)

This patch is the plan D variant for fixing potetial mutex locking
order exercised by BF aborting and KILL command execution.

In this approach, KILL command is replicated as TOI operation.
This guarantees total isolation for the KILL command execution
in the first node: there is no concurrent replication applying
and no concurrent DDL executing. Therefore there is no risk of
BF aborting to happen in parallel with KILL command execution
either. Potential mutex deadlocks between the different mutex
access paths with KILL command execution and BF aborting cannot
therefore happen.

TOI replication is used, in this approach, purely as means
to provide isolated KILL command execution in the first node.
KILL command should not (and must not) be applied in secondary
nodes. In this patch, we make this sure by skipping KILL
execution in secondary nodes, in applying phase, where we
bail out if applier thread is trying to execute KILL command.
This is effective, but skipping the applying of KILL command
could happen much earlier as well.

This patch also fixes mutex locking order and unprotected
THD member accesses on bf aborting case. We try to hold
THD::LOCK_thd_data during bf aborting. Only case where it
is not possible is at wsrep_abort_transaction before
call wsrep_innobase_kill_one_trx where we take InnoDB
mutexes first and then THD::LOCK_thd_data.

This will also fix possible race condition during
close_connection and while wsrep is disconnecting
connections.

Added wsrep_bf_kill_debug test case

Reviewed-by: Jan Lindström <email address hidden>

c8126d1... by Jan Lindström

Revert "MDEV-23328 Server hang due to Galera lock conflict resolution"

This reverts commit eac8341df4c3c7b98360f4e9498acf393dc055e3.

699de65... by Marko Mäkelä

Merge 10.4 into 10.5

03a1070... by Monty <email address hidden>

Fixed alias.test to also works with ps

The issue is that max_length for prepared statements are different from
normal queries, which can optimize the max_length based on the result
length.

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

MDEV-19950 addendum: galera_ssl_upgrade removed from the list of disabled tests and adapted for 10.4+

d3b3559... by Jan Lindström

MDEV-26053 : TRUNCATE on table with Foreign Key Constraint no longer replicated to other nodes

Problem was that there was extra condition !thd->lex->no_write_to_binlog
before call to begin TOI. It seems that this variable is not initialized.
TRUNCATE does not support [NO_WRITE_TO_BINLOG | LOCAL] keywords, thus
we should not check this condition. All this was hidden in a macro,
so I decided to remove those macros that were used only a few places
with actual function calls.

c430aa7... by Marko Mäkelä

MDEV-26626 InnoDB fails to advance the log checkpoint

buf_flush_page_cleaner(): Always try to advance the log checkpoint,
even when no pages were flushed during the latest batch.
Maybe, since the previous batch, there was an LRU flush that
removed the last dirty pages.

Failure to advance the log checkpoint will cause unnecessary work
in Mariabackup and on crash recovery.

65cce29... by Monty <email address hidden>

Updated rocksdb test result

This was required as I added a new error code to my_base.h and rocksdb
is adding it's own errors after the last official one

Updated result file also for index_merge_rocksdb2. This is a big test
and we have probably not before noticed that some optimizer changes
caused a difference.

5b0a760... by Eugene

MDEV-26621 assertion failue "index->table->persistent_autoinc" in /storage/innobase/btr/btr0btr.cc during IMPORT

dict_index_t::clear_instant_alter(): when searhing for an AUTO_INCREMENT column
don't skip the beginning of the list because the field can be at the beginning of the list

0d47945... by Monty <email address hidden>

Fixed bug in aria_chk that overwrote sort_buffer_length

This bug happens when one runs aria_chk on multiple tables. It does not
affect REPAIR TABLE.
aria_chk tries to optimize the sort buffer size to minimize memory usage
when used with small tables. The bug was that the adjusted value was
used as a base for the next table, which could cause problems.