[MDEV-32238] Add a switch to disable spider group by handler Created: 2023-09-25  Updated: 2024-01-14  Resolved: 2023-10-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Fix Version/s: 10.10.7, 10.11.6, 11.0.4, 11.1.3

Type: Task Priority: Critical
Reporter: Yuchen Pei Assignee: Yuchen Pei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-26364 Add Spider server variable for disabl... Closed
Relates
relates to MDEV-32246 Add tests to spider-gbh tickets for 1... Open
relates to MDEV-26247 Spider: Valid LEFT JOIN results in ER... Closed
relates to MDEV-28998 ASAN errors in spider_fields::free_co... Closed
relates to MDEV-29163 Server crash with SIGSEGV or dynamic-... Closed
relates to MDEV-30392 Syntax error upon query with subquery... Closed
relates to MDEV-31645 Spider doesn't recognize semi JOIN Closed
relates to MDEV-33197 SIGSEGV and UBSAN member access withi... Confirmed

 Description   

This serves as a workaround for many bugs caused by the spider group
by handler (GBH) (labeled with spider-gbh). There is a system
variable spider_use_handler that could disable the group by
handler if it is set to 1*, but it was deprecated, and then deleted
in 10.10+ (MDEV-27256). So we could add
spider_disable_group_by_handler to 10.10+.

For context, see a comment in MDEV-26247[1]:

Here's a little demo showing disabling the spider GBH "fixes" the
issue. It could be a fallback / workaround, and it would be
interesting to see which other gbh bugs can also be mitigated by
this workaround.

637c1a3c315 upstream/bb-11.0-ycp-mdev-26247-disable-gbh MDEV-26247 [demo] disabling the spider gbh fixes the issue

update on [2023-09-22 Fri]: I confirm that all other bugs current
labeled with spider-gbh can be mitigated by this workaround:

So it makes sense to add a system variable e.g.
spider_disable_group_by_handler.

[1] https://jira.mariadb.org/browse/MDEV-26247?focusedCommentId=269982&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-269982

*: When spider_use_handler is set to 1, it skips creating
conn_holder on spider fields which causes the return of a NULL
pointer in spider_create_group_by_hander().



 Comments   
Comment by Yuchen Pei [ 2023-09-25 ]

Hi holyfoot, ptal thanks

https://github.com/MariaDB/server/commit/86d396fa492b33786062d2a8f79287070b0ca233

Comment by Alexey Botchkov [ 2023-10-09 ]

ok to push.

Comment by Yuchen Pei [ 2023-10-11 ]

Thanks for the review, pushed 50784c88694098a583e7483489a01df0dafa4522 to 10.10

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