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.
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.
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.
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.
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.