maria:bb-11.2-ycp-mdev-28856-sysvar-option-same

Last commit made on 2023-08-28
Get this branch:
git clone -b bb-11.2-ycp-mdev-28856-sysvar-option-same https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11.2-ycp-mdev-28856-sysvar-option-same
Repository:
lp:maria

Recent commits

42d8eb4... by Yuchen Pei <email address hidden>

MDEV-28856 [demo] We cannot determine if any options have been specified

...because of how options associated with sysvars work. They are added
to option_list when the sysvar value is non-default.

This makes it impossible to determine whether the an option comes from
a SET statement (session level), or specified for the table (table
level). Given we are delaying deprecating the comment parsing to after
MDEV-28856, the only solution is to let comment parsing override
option values.

Consider this case:

set session spider_read_only_mode = 1;
create table t1 (c int) ENGINE=Spider COMMENT='read_only_mode "0", WRAPPER "mysql", srv "srv",TABLE "t2"';

The correct thing to do is to use the table level value 0 specified in
the comment. However, during the create table query, there no way to
tell whether option_struct->read_only (== 1) is set with a

`SET SESSION spider_read_only_mode = 1`

or as a create table option

SPIDER_READ_ONLY=1

And the only way to guarantee this works is to let comment parsing
override table options.

8aeb70e... by Yuchen Pei <email address hidden>

MDEV-28856 [wip] fix the spider read only table option

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

MDEV-28856 [wip] Adding read_only spider engine option

Not working yet.

It is added as an HA_TOPTION_SYSVAR, to the corresponding
read_only_mode thdvar. Because table options cannot be sigend, we
change the type of the thdvar from INT to UINT. Also because a sysvar
table option automatically take (at least the default) value from the
sysvar, we can get rid of all the -1's and overriding mechanism.

It is not working yet with some parsing error - the parser is not
recognising the new option for some reason.

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

MDEV-28856 [demo] Some further tests on some spider table params

8bc705a... by Yuchen Pei <email address hidden>

MDEV-28856 [demo] static_key_cardinality is always -1

All tests pass still

5786c69... by Yuchen Pei <email address hidden>

MDEV-28856 [demo] Spider: a test covering the query_cache_sync table param

52a3ebd... by Yuchen Pei <email address hidden>

MDEV-28856 Spider: code documentation on spider priority binary tree

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

Spider: wrapper should be case insensitive

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

MDEV-28856 [demo] 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.

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

MDEV-31586 Make the MDEV-31463 test more fitting and stable

The original test in the report of MDEV-31463 is contrived and
nondeterministic, causing MDEV-31586. We update the test to make it
more directly addresses the underlying cause of MDEV-31463, namely
errors from queries sent to the data node not consumed when trying to
set lock wait timeout. This is achieved through the debug sync
facility.