maria:bb-10.4-MDEV-30388-galera

Last commit made on 2023-05-11
Get this branch:
git clone -b bb-10.4-MDEV-30388-galera https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-MDEV-30388-galera
Repository:
lp:maria

Recent commits

bc275e8... by Daniele Sciascia <email address hidden>

MDEV-30473 Remove test galera.MDEV-27713

Remove test galera.MDEV-27713. This test relies on GET_LOCK() and has
stopped working since commit 844ddb1 (see MDEV-30473). This commit
disabled GET_LOCK() in combination with Galera.

Signed-off-by: Julius Goryavsky <email address hidden>

28eaf66... by =?utf-8?q?Jan_Lindstr=C3=B6m?= <email address hidden>

MDEV-30388 : Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted' failed

Problem for Galera is the fact that sequences are not really
transactional. Sequence operation is committed immediately
in sql_sequence.cd and later Galera could find out that
we have changes but actual statement is not there anymore.

Therefore, we must make some restrictions what kind
of sequences Galera can support.

(1) Galera cluster supports only sequences implemented
by InnoDB storage engine. This is because Galera replication
supports currently only InnoDB.

(2) We do not allow LOCK TABLE on sequence object and
we do not allow sequence creation under LOCK TABLE, instead
lock is released and we issue warning.

(3) We allow sequences with NOCACHE definition or with
INCREMEMENT BY 0 CACHE=n definition. This makes sure that
sequence values are unique accross Galera cluster.

Signed-off-by: Julius Goryavsky <email address hidden>

de703a2... by Oleksandr "Sanja" Byelkin

Merge branch '10.4' into 10.4.29 release

7e7e12e... by Oleg Smirnov

MDEV-30765 SHOW TABLES not working properly with lower_case_table_names=2

lower_case_table_names=2 means "table names and database names are
stored as declared, but they are compared in lowercase".
But names of objects in grants are stored in lowercase for any value
of lower_case_table_names. This caused an error when checking grants
for objects containing uppercase letters since table_hash_search()
didn't take into account lower_case_table_names value

8c6e314... by Daniel Bartholomew <email address hidden>

bump the VERSION

6544d88... by Igor Babaev

MDEV-31224 Crash with EXPLAIN EXTENDED for multi-table update of system table

EXPLAIN EXTENDED should always print the field item used in the left part
of an equality expression from the SET clause of an update statement as a
reference to table column.

Approved by Oleksandr Byelkin <email address hidden>

a09f661... by Igor Babaev

MDEV-31181 Crash with EXPLAIN EXTENDED for single-table DELETE using IN predicand

This bug affected EXPLAIN EXTENDED command for single-table DELETE that
used an IN subquery in its WHERE clause. A crash happened if the optimizer
chose to employ index_subquery or unique_subquery access when processing
such command.
The crash happened when the command tried to print the transformed query.
In the current code of 10.4 for single-table DELETE statements the output
of any explain command is produced after the join structures of all used
subqueries have been destroyed. JOIN::destroy() sets the field tab of the
JOIN_TAB structures created for subquery tables to NULL. As a result
subselect_indexsubquery_engine::print(), subselect_indexsubquery_engine()
cannot use this field to get the alias name of the joined table.

This patch suggests to use the field TABLE_LIST::TAB that can be accessed
from JOIN_TAB::tab_list to get the alias name of the joined table.

Approved by Oleksandr Byelkin <email address hidden>

84b9fc2... by Monty <email address hidden>

Fixed wrong test cases (embedded and ASAN)

- main.selectivity failed because one test produced different result with
  embedded (missing feature). Fixed by moving the failing part to
  selectivity_notembedded.
- Disabled maria.encrypt-no-key for embedded as embedded does not support
  encryption
- Moved test from join_cache to join_cache_notasan that tried to alloc()
  a buffer bigger than available memory.

c874d5c... by Monty <email address hidden>

Added missing test file

e74390d... by Monty <email address hidden>

Cleanup of sql_join_cache code (no logic changes)

- Remove virtual from get_min_join_buffer_size() and
  get_max_join_buffer_size().
- Avoid some calls to get_min_buffer_size()
- Simply cache usage in get_..._join_buffer_size()
- Simplify get_max_join_buffer_size() when using optimize_buff_size
- Reindented some long comments

Reviewer: Sergei Petrunia <email address hidden>