maria:bb-10.5-mdev-32157

Last commit made on 2023-09-15
Get this branch:
git clone -b bb-10.5-mdev-32157 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-mdev-32157
Repository:
lp:maria

Recent commits

6fbef65... by Yuchen Pei <email address hidden>

MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups

Removed some redundant hint related string literals from
spd_db_conn.cc

Clean up SPIDER_PARAM_*_[CHAR]LEN[S]

Adding tests covering monitoring_kind=2. What it does is that it reads
from mysql.spider_link_mon_servers with matching db_name, table_name,
link_id, and does not do anything about that...

How monitoring_* can be useful: in the deprecated spider high
availability feature, when one remote fails, spider will try another
remote, which apparently makes use of these table parameters.

A test covering the query_cache_sync table param. Some further tests
on some spider table params.

Wrapper should be case insensitive.

Code documentation on spider priority binary tree.

Add an assertion that static_key_cardinality is always -1. All tests
pass still

68e419a... by Yuchen Pei <email address hidden>

MDEV-32157 MDEV-28856 Spider: drop server in tests

This helps eliminate "server exists" failures

Also, spider/bugfix.mdev_29676, when enabled after MDEV-29525 is
pushed will fail because we have not --recorded the result. But the
failure will only emerge when working on MDEV-31138 where we manually
re-enable this test, so let's worry about that then.

68a0020... by Yuchen Pei <email address hidden>

MDEV-29502 Fix some issues with spider direct aggregate

The direct aggregate mechanism sems to be only intended to work when
otherwise a full table scan query will be executed from the spider
node and the aggregation done at the spider node too. Typically this
happens in sub_select(). In the test spider.direct_aggregate_part
direct aggregate allows to send COUNT statements directly to the data
nodes and adds up the results at the spider node, instead of iterating
over the rows one by one at the spider node.

By contrast, the group by handler (GBH) typically sends aggregated
queries directly to data nodes, in which case DA does not improve the
situation here.

That is why we should fix it by disabling DA when GBH is used.

There are other reasons supporting this change. First, the creation of
GBH results in a call to change_to_use_tmp_fields() (as opposed to
setup_copy_fields()) which causes the spider DA function
spider_db_fetch_for_item_sum_funcs() to work on wrong items. Second,
the spider DA function only calls direct_add() on the items, and the
follow-up add() needs to be called by the sql layer code. In
do_select(), after executing the query with the GBH, it seems that the
required add() would not necessarily be called.

Disabling DA when GBH is used does fix the bug. There are a few
other things included in this commit to improve the situation with
spider DA:

1. Add a session variable that allows user to disable DA completely,
this will help as a temporary measure if/when further bugs with DA
emerge.

2. Move the increment of direct_aggregate_count to the spider DA
function. Currently this is done in rather bizarre and random
locations.

3. Fix the spider_db_mbase_row creation so that the last of its row
field (sentinel) is NULL. The code is already doing a null check, but
somehow the sentinel field is on an invalid address, causing the
segfaults. With a correct implementation of the row creation, we can
avoid such segfaults.

e95e9a2... by Yuchen Pei <email address hidden>

Merge branch '10.4' into 10.5

96760d3... by Yuchen Pei <email address hidden>

MDEV-31787 MDEV-26151 Add a test exercising non-0 spider_casual_read

Also:
- clean up spider_check_and_get_casual_read_conn() and
  spider_check_and_set_autocommit()
- remove a couple of commented out code blocks

d59334d... by Yuchen Pei <email address hidden>

MDEV-31673 [fixup] Fixing indentation from previous mdev-31673 patch

15cd854... by Anel Husakovic <email address hidden>

MDEV-32004: Cosmetic fixes

- Reviewer: <email address hidden>
            <email address hidden>

8d6ae0f... by Anel Husakovic <email address hidden>

MDEV-32004: Remove extra `server_<num>_1` connections during initialization

- Remove extra connections in the form of `server_number_1` for the same server
  during initialization of servers in the `rpl_init.inc` file.
- Remove disconnecting and reconnecting to the same connections,
  since they are not used by the test.
- Update comments about the above.

- Reviewer: <email address hidden>
            <email address hidden>

2534e5b... by Anel Husakovic <email address hidden>

MDEV-32004: Parse error in mtr tests when using rpl_check_server_ids parameter

- Fix the calling of the assertion condition when `rpl_check_server_ids` parameter is used.
- Fix comments regarding the default usage and configuration files
extension in this case.

- Reviewer: <email address hidden>
            <email address hidden>

81e60f1... by Marko Mäkelä

MDEV-32163 Crash recovery fails after DROP TABLE in system tablespace

fseg_free_extent(): After fsp_free_extent() succeeded, properly
mark the affected pages as freed. We failed to write FREE_PAGE records.

This bug was revealed or caused by
commit e938d7c18f6f117b63fcfc50dd975029d92409a7 (MDEV-32028).