[MDEV-31831] Spurious extra columns in spider queries sent to data nodes Created: 2023-08-03  Updated: 2023-09-03

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 11.0
Fix Version/s: 11.0

Type: Bug Priority: Major
Reporter: Yuchen Pei Assignee: Yuchen Pei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

As observed in MDEV-29502[1], spider query rewrites may add a spurious extra column in queries sent to data nodes.

For example, in the test spider.direct_aggregate_part and spider/bg.direct_aggregate_part, the query to spider table query "SELECT SUM(a) FROM ta_l2" is rewritten as "select sum(`a`),min(`a`) from `auto_test_remote`.`ta_r2` limit 2". The "limit 2" could come from the knowledge there are two rows in the remote table, but the extra "min(`a`)" makes no sense.

[1] https://jira.mariadb.org/browse/MDEV-29502?focusedCommentId=264225&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-264225

This probably affects other versions too.


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