maria:bb-11.0-mdev-22979-init-query-in-spider-db-init

Last commit made on 2023-04-26
Get this branch:
git clone -b bb-11.0-mdev-22979-init-query-in-spider-db-init https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11.0-mdev-22979-init-query-in-spider-db-init
Repository:
lp:maria

Recent commits

27109b7... by Yuchen Pei

MDEV-22979 [do not push] Move spider init query execution from a background thread to spider_db_init()

This is the original fix by nayuta for MDEV-27233, but it fails
spider/bugfix.mdev_29904

3799493... by Yuchen Pei

MDEV-27233-22979-30370 Add and update tests for spider init bugs

For development only - will squash this into another commit later - do
not push.

mdev_27233_v2: a variant of mdev-27233 where the spider plugin is
loaded in during server startup.

mdev_30370: we update this test to use mysqld_cmd instead of the
noisy mysqld_bootstrap_cmd. We have to kill the server first to avoid
"Can't lock aria control file"

With the change in commit c160a115b8b that was pushed to fix
mdev-27233 but later reverted because of mdev-29904, mdev_27233 and
the updated mdev_30370 would pass, but not mdev_27233_v2 ("[ERROR]
SPIDER plugin initialization failed at 'drop procedure if exists
mysql.spider_fix_one_table' by 'Unknown storage engine 'Aria''") or
mdev_30370 if it uses mysqld_bootstrap_cmd (post-test check will fail
when running this case with some other case, e.g. mtr mdev_30370
mdev_29562).

5746cad... by Yuchen Pei

MDEV-27095 clean up spd_init_query.h

700c0ae... by Yuchen Pei

MDEV-27095 spider should be installed with INSTALL SONAME ha_spider

There are several plugins in ha_spider: spider, spider_alloc_mem,
spider_wrapper_protocols, spider_rewrite etc.

INSTALL PLUGIN foo SONAME ha_spider causes all the other ones to be
installed by the init queries where foo is any of the plugins.

This introduces unnecessary complexiy. For example it reads
mysql.plugins to find all other plugins, causing the hack of moving
spider plugin init to a separate thread.

To install all spider related plugins, install soname ha_spider should
be used instead.

bc0cbf6... by Yuchen Pei

MDEV-29676 Some changes in behaviour w.r.t. spider sts crd

- assign spider->share early when !new_share
- remove locking before spider_share_init_{sts,crd}

0e7e5b0... by Yuchen Pei

MDEV-29676 refactored and documented spider_get_share() and friends

Extracted out common subroutines, gave more meaningful names etc,
added comments etc.

Also:
- Documented active servers load balancing reads, and other fields in
  SPIDER_SHARE etc.
- Removed commented out code
- Documented and refactored self-reference check
- Removed some unnecessary functions
- Renamed unhelpful root_count
- Refactored spider_get_{sts,crd}, where we turn get_type into an enum
- Cleaned up spider_mbase_handler::show_table_status() and
  spider_mbase_handler::show_index()

03a693e... by Yuchen Pei

MDEV-30265 Document some sts related functions in spider.

fcdf565... by Yuchen Pei

MDEV-30542 Add multilength spider self-reference detection test

8c0879e... by Yuchen Pei

MDEV-28363 remove #ifdef SPIDER_use_LEX_CSTRING_for_Field_blob_constructor

30df6c4... by Yuchen Pei

MDEV-30581 Add a testcase for MDEV-29904