[MDEV-32683] Spider engine does not load with non-default alter-algorithm Created: 2023-11-04  Updated: 2023-12-14  Resolved: 2023-11-07

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Storage Engine - Spider, Variables
Affects Version/s: 10.10
Fix Version/s: 10.10.7, 10.11.6, 11.0.4, 11.1.3, 11.2.2

Type: Bug Priority: Blocker
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: regression

Issue Links:
Problem/Incident
is caused by MDEV-22979 "mysqld --bootstrap" / mysql_install_... Closed

 Description   

Spider does not load if the server is running with alter_algorithm=INSTANT (or NOCOPY, or INPLACE).

It is true both when the server is started with a non-default alter-algorithm and plugin-load-add=ha_spider or when they are set/loaded at runtime.

The failure started happening after these 2 commits in 10.10:

First,

commit c6ba81d6bf6b060853900d1ed7465bfa8553a0fe 
Author:     Yuchen Pei <yuchen.pei@mariadb.com>
CommitDate: Thu Oct 5 15:47:39 2023 +1100
 
    MDEV-27095 clean up spd_init_query.h

caused the error in the error log

ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY

but the plugin would still load (at least on startup).
Later after

commit a60cf9c7ae4ae012443a6a91db4ee265fa6e4403
Author:     Yuchen Pei <ycp@mariadb.com>
CommitDate: Thu Oct 5 16:19:10 2023 +1100
 
    MDEV-22979 MDEV-27233 MDEV-28218 Fixing spider init bugs

the error became more verbose

[ERROR] SPIDER plugin initialization failed at 'alter table mysql.spider_tables  add column if not exists link_id int not null default 0 after table_name,  drop primary key,  add primary key (db_name, table_name, link_id);' by 'ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY'

and the plugin stopped loading.



 Comments   
Comment by Yuchen Pei [ 2023-11-07 ]

For reference, the fix seems to be

upstream/10.10 21822625aa675b36a5c2548f78e8d3d8cde8b7cd
MDEV-32683 Spider engine does not load with non-default alter-algorithm
 
specify algorithm/lock explicitly, don't depend on server settings

Thanks for fixing it serg.

Generated at Thu Feb 08 10:33:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.