[MDEV-26287] Refactor spider_db_append_key_where_internal() Created: 2021-07-31  Updated: 2023-11-28

Status: Stalled
Project: MariaDB Server
Component/s: Storage Engine - Spider
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2

Type: Task Priority: Minor
Reporter: Nayuta Yanagisawa (Inactive) Assignee: Yuchen Pei
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-27172 Prefix indices on Spider tables may l... Closed
relates to MDEV-26289 Add unit tests for spider_db_append_k... Closed
Epic Link: Spider Refactoring

 Description   

Refactor the function spider_db_append_key_where_internal(). The function is quite large and difficult to maintain. It was a source of some bugs that wrongly rewrite queries (e.g., MDEV-25985, MDEV-26111).

  • Split the function into multiple different functions by that sql_type is SQL or HANDLER and that two key_ranges are NULL or not.
  • * (other refactoring here)

You don't need to make everything ideal at once, and it's impossible to do that with complex middleware like databases. Refactor only to the extent that you are sure it is safe to do so without additional unit tests.


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