maria:bb-10.4-MDEV-24688

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

Branch merges

Branch information

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

Recent commits

533b5fa... by Jan Lindström

MDEV-24688 : galera.galera_ist_progress MTR failed: assert_grep.inc failed

Grep is not safe as it will confuse if there is more than one
matching line or if progress report is slightly different as
progress reporting is afected by how fast IST is send/received.

Fix is to use sed and we are interested only that there is at
least one progress report from IST.

af81040... by Sergei Golubchik

MDEV-28098 incorrect key in "dup value" error after long unique

reset errkey after using it, so that it wouldn't affect
the next error message in the next statement

0e4bc67... by Alexander Barkov

10.4 specific changes for "MDEV-27494 Rename .ic files to .inl"

Renaming ctype-uca.ic to ctype-uca.inl

This file was introduced in 10.4,
so it did not get to the main 10.2 patch for MDEV-27494

39feab3... by Igor Babaev

MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT

IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused a crash of the server. This happened because the
outer context field in the Name_resolution_context structure was not set
to NULL for such references. Rather it pointed to the first element in
the select_stack.

Note that starting from 10.4 we cannot use the SELECT_LEX::outer_select()
method when parsing a SELECT construct.

Approved by Oleksandr Byelkin <email address hidden>

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

MDEV-28377: galera_as_slave_nonprim bind: Address already in use

This commit fixes a crash reported as MDEV-28377 and a number
of other crashes in automated tests with mtr that are related
to broken .cnf files in galera and galera_3nodes suites, which
happened when automatically migrating MDEV-26171 from 10.3 to
subsequent higher versions.

e6bbc83... by Sergei Golubchik

MDEV-26212 PAM authentication fails with ENOMEM

use posix_spawn(), not fork() - it's better for systems that don't
overcommit memory

d45841b... by Rucha Deodhar <email address hidden>

MDEV-26695: Number of an invalid row is not calculated for table value
constructor

Analysis: counter does not increment while sending rows for table value
constructor and so row_number assumes the default value (0 in this case).
Fix: Increment the counter to avoid counter using default value.

551e781... by Daniel Black

MDEV-28227 Chinese translation postfix

Add chinese language to missing sql/share/CMakeLists.txt that
results in installed files.

Also add bulgarian=bgn which has existing for a long time.

Sort both lists properly.

Append both to debian/mariadb-server-core-10.4 too.

d16c3ac... by Brandon Nesterenko

MDEV-26473: mysqld got exception 0xc0000005 (rpl_slave_state/rpl_load_gtid_slave_state)

Problem:
========
During mysqld initialization, if the number of GTIDs added since
that last purge of the mysql.gtid_slave_pos tables is greater than
or equal to the –-gtid-cleanup-batch-size value, a race condition
can occur. Specifically, the binlog background thread will submit
the bg_gtid_delete_pending job to the mysql handle manager; however,
the mysql handle manager may not be initialized, leading to crashes.

Solution:
========
Force the mysql handle manager to initialize/start before the binlog
background thread is created.

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

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>