[MDEV-25845] Remove one SELECT_DESCRIBE check in JOIN::optimize_inner() Created: 2021-06-02  Updated: 2023-12-22

Status: Open
Project: MariaDB Server
Component/s: Optimizer
Fix Version/s: 11.5

Type: Task Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-25846 Remove one SELECT_DESCRIBE check in J... Closed
Relates
relates to MDEV-25576 The statement EXPLAIN running as regu... Closed

 Description   

This is a followup to MDEV-25576, this part:

https://jira.mariadb.org/browse/MDEV-25576?focusedCommentId=190651&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-190651

JOIN::optimize_inner has this code

  if (const_table_map != found_const_table_map &&
      !(select_options & SELECT_DESCRIBE))
  {
    // There is at least one empty const table
    zero_result_cause= "no matching row in const table";
    ...
    goto setup_subq_exit;

The !(select_options & SELECT_DESCRIBE)) part is bad practice.

Removing it causes a lot of changes in EXPLAIN output.


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