maria:bb-10.4-MDEV-28377

Last commit made on 2022-04-25
Get this branch:
git clone -b bb-10.4-MDEV-28377 https://git.launchpad.net/maria

Branch merges

Branch information

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

Recent commits

897adcb... by Jan Lindström

MDEV-28377 : galera.galera_as_slave_nonprim bind: Address already in use

Reported error is caused by misconfiguration of node_2. Additionally,
node_4 that should have been non-galera node contained also
incorrect configuration parameters. Removed some sleeps from test
case and replaced them with wait_condition.

a83c7ab... by Brandon Nesterenko

MDEV-11853: semisync thread can be killed after sync binlog but before ACK in the sync state

Problem:
========
If a primary is shutdown during an active semi-sync connection
during the period when the primary is awaiting an ACK, the primary
hard kills the active communication thread and does not ensure the
transaction was received by a replica. This can lead to an
inconsistent replication state.

Solution:
========
During shutdown, the primary should wait for an ACK or timeout
before hard killing a thread which is awaiting a communication. We
extend the `SHUTDOWN WAIT FOR SLAVES` logic to identify and ignore
any threads waiting for a semi-sync ACK in phase 1. Then, before
stopping the ack receiver thread, the shutdown is delayed until all
waiting semi-sync connections receive an ACK or time out. The
connections are then killed in phase 2.

Notes:
 1) There remains an unresolved corner case that affects this
patch. MDEV-28141: Slave crashes with Packets out of order when
connecting to a shutting down master. Specifically, If a slave is
connecting to a master which is actively shutting down, the slave
can crash with a "Packets out of order" assertion error. To get
around this issue in the MTR tests, the primary will wait a small
amount of time before phase 1 killing threads to let the replicas
safely stop (if applicable).
 2) This patch also fixes MDEV-28114: Semi-sync Master ACK Receiver
Thread Can Error on COM_QUIT

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

807945f... by Sergey Petrunia

MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...

When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see if it should call item->cleanup() or leave the item as-is.

The failure happens when a constant item has a non-constant one inside it,
like:

   (tbl.col=0 AND impossible_cond)

item->walk(cleanup_excluding_immutables_processor) works in a bottom-up
way so it
1. will call Item_func_eq(tbl.col=0)->cleanup()
2. will not call Item_cond_and->cleanup (as the AND is constant)

This creates an item tree where a fixed Item has an un-fixed Item inside
it which eventually causes an assertion failure.

Fixed by introducing this rule: instead of just calling

  item->set_extraction_flag(IMMUTABLE_FL);

we call Item::walk() to set the flag for all sub-items of the item.

32041e7... by Daniel Black

MDEV-28227 Error message Chinese translation (typos)

Thanks Marko for noticing.

188aae6... by Vlad Lesin

MDEV-26224 InnoDB fails to remove AUTO_INCREMENT attribute

Reset dict_table_t::persistent_autoinc when inplace alter table is
committed successfully.

aec8560... by Marko Mäkelä

WolfSSL v5.2.0-stable

f84b5d7... by Marko Mäkelä

Fix clang -Wunused-but-set-variable

3947840... by Marko Mäkelä

Merge 10.3 into 10.4

4730314... by Marko Mäkelä

MDEV-28369 ibuf_bitmap_mutex is an unnecessary contention point

The only purpose of ibuf_bitmap_mutex is to prevent a deadlock between
two concurrent invocations of ibuf_update_free_bits_for_two_pages_low()
on the same pair of bitmap pages, but in opposite order.
The mutex is unnecessarily serializing the execution of the function
even when it is being invoked on totally different tablespaces.
To avoid deadlocks, it suffices to ensure that the two page latches
are being acquired in a deterministic (sorted) order.

d7189fb... by Haidong Ji

MDEV-28227 Error message Chinese translation

- Simplified Chinese translation added
- Character encoding is gdk
-- gdk covers more characters
-- gdk includes both Simplified and Traditional
-- best option I think, may need to work along with other locale
settings
- Other cleanup
-- Within each error, messages are sorted according to language code
-- More consistent formatting (8 spaces proceeding each translation)
-- jps removed as duplicate of jpn translation

This should be a good starting point. More refinement is appreciated,
and needed down the road.

English "containt" (sic) spelling fixes on ER_FK_NO_INDEX_{CHILD,PARENT}
resulting in mtr test case adjustments.

Edited/reviewed by Daniel Black