maria:bb-10.5-mdev-33777

Last commit made on 2024-03-27
Get this branch:
git clone -b bb-10.5-mdev-33777 https://git.launchpad.net/maria

Branch merges

Branch information

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

Recent commits

84f8b9b... by Yuchen Pei <email address hidden>

MDEV-33777 Spider: Correct checks for show index column numbers

It was updated for 10.6+ in MDEV-7317. Because a lower version spider
node may connect to a higher version data node, we need to change this
for 10.4 and 10.5 as well.

733ec18... by Yuchen Pei <email address hidden>

MDEV-33220 Fix -wmaybe-uninitialized warnings for g++-13

762bb7b... by Yuchen Pei <email address hidden>

MDEV-33661 MENT-1591 Keep spider in memory until exit in ASAN builds

Same as MDEV-29579. For some reason, libodbc does not clean up
properly if unloaded too early with the dlclose() of spider. So we add
UNIQUE symbols to spider so the spider does not reload in dlclose().

This change, however, uncovers some hidden problems in the spider
codebase, for which we move the initialisation of some spider global
variables into the initialisation of spider itself.

Spider has some global variables. Their initialisation should be done
in the initialisation of spider itself, otherwise, if spider were
re-initialised without these symbol being unloaded, the values could
be inconsistent and causing issues.

One such issue is caused by the variables
spider_mon_table_cache_version and spider_mon_table_cache_version_req.
They are used for resetting the spider monitoring table cache and have
initial values of 0 and 1 respectively. We have that always
spider_mon_table_cache_version_req >= spider_mon_table_cache_version,
and when the relation is strict, the cache is reset,
spider_mon_table_cache_version is brought to be equal to
spider_mon_table_cache_version_req, and the cache is searched for
matching table_name, db_name and link_idx. If the relation is equal,
no reset would happen and the cache would be searched directly.

When spider is re-inited without resetting the values of
spider_mon_table_cache_version and spider_mon_table_cache_version_req
that were set to be equal in the previous cache reset action, the
cache was emptied in the previous spider deinit, which would result in
HA_ERR_KEY_NOT_FOUND unexpectedly.

An alternative way to fix this issue would be to call the spider udf
spider_flush_mon_cache_table(), which increments
spider_mon_table_cache_version_req thus making sure the inequality is
strict. However, there's no reason for spider to initialise these
global variables on dlopen(), rather than on spider init, which is
cleaner and "purer".

To reproduce this issue, simply revert the changes involving the two
variables and then run:

mtr --no-reorder spider.ha{,_part}

9e67a64... by Yuchen Pei <email address hidden>

MDEV-33661 MENT-1591 Fix spider/bugfix.mdev_28856 because of MDEV-29718.

The failure should be table not found, rather than no spider same
server link

4de91b9... by Yuchen Pei <email address hidden>

MDEV-33661 MENT-1591 Documenting spider_mon_table_cache and friends.

Partial documentation due to time constraints. Will improve over time.

Also removed a redundant parameter link_idx from
spider_get_sys_tables_connect_info().

And deleted some commented out code.

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

MDEV-33584 Use the default SQL_MODE for spider init queries

This should fix all future problems caused by a non-default global
sql_mode from the server where spider is to be installed.

757d275... by Yuchen Pei <email address hidden>

MDEV-33538 make auxiliary spider plugins init depend on actual spider

The two I_S plugins SPIDER_ALLOC_MEM and SPIDER_WRAPPER_PROTOCOL
only makes sense if the main SPIDER plugin is installed. Further,
SPIDER_ALLOC_MEM requires a mutex that requires SPIDER init to fill
the table.

We also update the spider init query to override
--transaction_read_only=on so that it does not affect the spider init.

Also fixed error handling in spider_db_init() so that failure in
spider table init does not result in memory leak

7d36919... by VladislavVaintroub

MDEV-33723 Mroonga ignored WITHOUT_DYNAMIC_PLUGINS

Make WITHOUT_DYNAMIC_PLUGINS ignore mrooonga also in its own DIY version
of MYSQL_ADD_PLUGIN

a13e521... by Daniel Black

MDEV-33636: RPM caps is on mariadbd exe

Postfix on 51e3f1daf54309d14fe8db438024d88aa110e86a that
mariadbd should be the executable name rather than capabilities
on a symlink.

4592af2... by Marko Mäkelä

Work around missing MSAN instrumentation

Let us skip the recently added test main.mysql-interactive if
an instrumented ncurses library is not available.

In InnoDB, let us work around an uninstrumented libnuma, by
declaring that the objects returned by numa_get_mems_allowed()
are initialized.