[MDEV-14517] Cleanup for Item::with_subselect and Item::has_subquery() Created: 2017-11-28  Updated: 2021-05-19  Resolved: 2017-11-28

Status: Closed
Project: MariaDB Server
Component/s: Data Manipulation - Subquery
Fix Version/s: 10.3.3

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: refactoring


 Description   

There are two parallel implementations for the same thing - detection if an Item has a subquery, directly or recursively, e.g. via arguments etc.

  • A memmber Item::with_subselect, which is set in constructors and/or during fix_fields()
  • A virtual method Item::has_subquery()

We'll remove Item::with_subselect and use the virtual implementation all around the code.

Rationale:
1. Get rid of duplicate functionality
2 With virtual implementation it will be easier to follow:

  • which Item subclasses always have a subquery (e.g. Item_subselect)
  • which Item subclasses can have a subquery
  • which Item subclasses can never have a subquery

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