Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Duplicate
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.11
Description
The loading of the spider plugin causes a background thread to be created and the set of sql in storage/spider/spd_init_query.h to be run.
Running mysql_upgrade at the same time the initialization of spider is occurring can cause problems as MDEV-27068 shows.
One of the conflicts was
- ALTER TABLE proc MODIFY
- and spiders' {{ drop procedure}}
Other similar conflicts can occur on plugin and udf function installation
MDEV-19275 sql service for plugins means 10.7+ can simply this. Is it valid during initialization? Not 100% sure, but if it is, it would avoid the mariadb-upgrade conflicts.
Other simplifications are:
spider_fix_one_table looks like a simple modification of the ALTER TABLE syntax to use the column IF NOT EXISTS syntax of https://mariadb.com/kb/en/alter-table/ would negate the need for this function.
mysql.spider_fix_system_tables, a procedure with zero arguments that sets user variables could be inline. Or better, removed and use the executable comment syntax in https://mariadb.com/kb/en/comment-syntax/#executable-comment-syntax to run statements based on the server version.
Can the following be implemented another way install plugin [spider_rewrite soname 'ha_spider' (INSTALL PLUGIN has IF NOT EXISTS from 10.4)
Can the udf functions created another way?
Is there are reason (all of) this couldn't be part of mysql-upgrade? wrapped under conditional upgrade if spider is installed?
Attachments
Issue Links
- is blocked by
-
MDEV-27107 prevent two mariadb-upgrade running in parallel
-
- Closed
-
- is part of
-
MDEV-22979 "mysqld --bootstrap" / mysql_install_db hangs when Spider is installed
-
- Closed
-
- relates to
-
MDEV-19842 Crash while creating statistics for Spider table
-
- Closed
-
-
MDEV-27998 Delete spider_table_crd_thread_count and spider_table_sts_thread_count
-
- Stalled
-
-
MDEV-28553 Spider: clean up plugin initialization SQLs in spd_init_query.h
-
- Open
-
-
MDEV-32804 Remove the (unimplemented and unused) spider_rewrite_plugin
-
- Closed
-
-
MDEV-14622 Running mysql_upgrade in background upon package installation or upgrade causes deadlocks and other side-effects
-
- Closed
-
-
MDEV-19850 per-plugin install/uninstall scriptlets
-
- Stalled
-
-
MDEV-27233 Server hangs when using --init-file which loads Spider and creates a Spider table
-
- Closed
-
In
MDEV-27107there was an explicit lock for the mariadb-upgrade (where a second mariadb-upgrade could terminate if it doesn't get the lock), but I was thinking of a second mariadb-plugin-init lock exclusively acquired when mariadb does its system tables updates, where it will wait. The intent is that this lock can be acquired by plugins like spider/columnstore for the install plugin / udf that may not have an easy work around.The other option that is probably also equally valid is ensuring that INSTALL PLUGIN and similar SQL on the system tables acquires metadata locks of the tables correctly (worthy of another task) if found to be deficient.