[MDEV-8332] Get rid of Item_func::sargable Created: 2015-06-18  Updated: 2015-06-26  Resolved: 2015-06-26

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.1
Fix Version/s: 10.1.6

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

Item_int_func::sargable is permanently set in constructor.
It's only used to implement "virtual bool Item::count_sargable_conds()" for Item_int_func descendants.

There is a little sense to have two things that implement the same thing.
Everything should be done through proper virtual method implementation and its proper inheritance.

Proposed changes about count_sargable_conds():

  • Item_int_func should use the default non-optimized derived implementation that comes from Item
  • Item_int_func descendants that can really use optimizer (e.g. Item_bool_rowready_func2, Item_func_spatial_rel, Item_func_like) should just implement their own versions. Note, it's important to avoid code duplication here.

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