maria:bb-10.5-MDEV-33967-handersocket-binlog-pkgtest

Last commit made on 2024-04-23
Get this branch:
git clone -b bb-10.5-MDEV-33967-handersocket-binlog-pkgtest https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-MDEV-33967-handersocket-binlog-pkgtest
Repository:
lp:maria

Recent commits

69e2843... by Daniel Black

MDEV-33967 hander socket writes do not result in binary log entries

As handlersocket bypasses the sql layer that prepares and causes
binary log entries to be created, we need to do this in the
plugin directly to create binary log entries.

Reported thanks to Yutaro Iwasaki on Zulip.

361b790... by Markus Staab <email address hidden>

Remove unnecessary whitespace in mysqldump

57f6a1c... by Kristian Nielsen

MDEV-19415: use-after-free on charsets_dir from slave connect

The slave IO thread sets MYSQL_SET_CHARSET_DIR. The code for this option
however is not thread-safe in sql-common/client.c. The value set is
temporarily written to mysys global variable `charsets-dir` and can be seen
by other threads running in parallel, which can result in use-after-free
error.

Problem was visible as random failures of test cases in suite multi_source
with Valgrind or MSAN.

Work-around by not setting this option for slave connect, it is redundant
anyway as it is just setting the default value.

Signed-off-by: Kristian Nielsen <email address hidden>

0c249ad... by Kristian Nielsen

MDEV-30232: rpl.rpl_gtid_crash fails sporadically in BB

The root cause of the failure is a bug in the Linux network stack:

  https://<email address hidden>/T/#u

If the slave does a connect(2) at the exact same time that kill -9 of the
master process closes the listening socket, the FIN or RST packet is lost in
the kernel, and the slave ends up timing out waiting for the initial
communication from the server. This timeout defaults to
--slave-net-timeout=120, which causes include/master_gtid_wait.inc to time
out first and fail the test.

Work-around this problem by reducing the --slave-net-timeout for this test
case. If this problem turns up in other tests, we can consider reducing the
default value for all tests.

Signed-off-by: Kristian Nielsen <email address hidden>

4a2e034... by Sergei Golubchik

MDEV-33952 galera_create_table_as_select fails sporadically

disable until fixed

7432a48... by Zhibo Zhang <email address hidden>

Update tests to be compatible with OpenSSL 3.2.0

As of version 3.2.0, OpenSSL updated the error message in new versions
("https://github.com/openssl/openssl/commit/81b741f68984"). Update the
tests and result files such that they are compatible with both original
and new error messages.

All new code of the whole pull request, including one or several files that are
either new files or modified ones, are contributed under the BSD-new
license. I am contributing on behalf of my employer Amazon Web Services,
Inc.

4c34339... by Marko Mäkelä

MDEV-33946: OPT_PAGE_CHECKSUM mismatch due to mtr_t::memmove()

mtr_t::memmove(): Revert to the parent of
commit a032f14b342c782b82dfcd9235805bee446e6fe8
where there was supposed to be an equivalent change
that would avoid hitting a warning in some old version of GCC
when this change was part of another 10.6 based developmet branch.

For some reason, this change is not equivalent but will cause
massive amounts of backup failures in the stress tests
run by Matthias Leich, caught by
commit 4179f93d28035ea2798cb1c16feeaaef87ab4775 in 10.6.

2e84560... by VladislavVaintroub

MDEV-16944 postfix. Fix a typo

5928e04... by mariadb-DebarunBanerjee <email address hidden>

MDEV-32489 Change buffer index fails to delete the records

When the change buffer records for a page span across multiple change
buffer leaf pages or the starting record is at the beginning of a page
with a left sibling, ibuf_delete_recs deletes only the records in first
page and fails to move to subsequent pages.

Subsequently a slow shutdown hangs trying to delete those left over
records.

Fix-A: Position the cursor to an user record in B-tree and exit only
when all records are exhausted.

Fix-B: Make sure we call ibuf_delete_recs during slow shutdown for
pages with IBUF entries to cleanup any previously left over records.

0ad52e4... by Brandon Nesterenko

MDEV-27512: Assertion !thd->transaction_rollback_request failed in rows_event_stmt_cleanup

If replicating an event in ROW format, and InnoDB detects a deadlock
while searching for a row, the row event will error and rollback in
InnoDB and indicate that the binlog cache also needs to be cleared,
i.e. by marking thd->transaction_rollback_request. In the normal
case, this will trigger an error in Rows_log_event::do_apply_event()
and cause a rollback. During the Rows_log_event::do_apply_event()
cleanup of a successful event application, there is a DBUG_ASSERT in
log_event_server.cc::rows_event_stmt_cleanup(), which sets the
expectation that thd->transaction_rollback_request cannot be set
because the general rollback (i.e. not the InnoDB rollback) should
have happened already. However, if the replica is configured to skip
deadlock errors, the rows event logic will clear the error and
continue on, as if no error happened. This results in
thd->transaction_rollback_request being set while in
rows_event_stmt_cleanup(), thereby triggering the assertion.

This patch fixes this in the following ways:
 1) The assertion is invalid, and thereby removed.
 2) The rollback case is forced in rows_event_stmt_cleanup() if
transaction_rollback_request is set.

Note the differing behavior between transactions which are skipped
due to deadlock errors and other errors. When a transaction is
skipped due to an ignored deadlock error, the entire transaction is
rolled back and skipped (though note MDEV-33930 which allows
statements in the same transaction after the deadlock-inducing one
to commit). When a transaction is skipped due to ignoring a
different error, only the erroring statements are rolled-back and
skipped - the rest of the transaction will execute as normal. The
effect of this can be seen in the test results. The added test case
to rpl_skip_error.test shows that only statements which are ignored
due to non-deadlock errors are ignored in larger transactions. A
diff between rpl_temporary_error2_skip_all.result and
rpl_temporary_error2.result shows that all statements in the errored
transaction are rolled back (diff pasted below):

: diff rpl_temporary_error2.result rpl_temporary_error2_skip_all.result
49c49
< 2 1
---
> 2 NULL
51c51
< 4 1
---
> 4 NULL
53c53
< * There will be two rows in t2 due to the retry.
---
> * There will be one row in t2 because the ignored deadlock does not retry.
57d56
< 1
59c58
< 1
---
> 0

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