Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-33971 NAME_CONST in WHERE clause replaced by inner item #3236

Open
wants to merge 1 commit into
base: 10.6
Choose a base branch
from

Commits on Jun 12, 2024

  1. MDEV-33971 NAME_CONST in WHERE clause replaced by inner item

    Improve performance of queries like
      SELECT * FROM t1 WHERE field = NAME_CONST('a', 4);
    by, in this example, replacing the WHERE clause with field = 4
    in the case of ref access.
    
    The rewrite is done during fix_fields and we disambiguate this
    case from other cases of NAME_CONST by inspecting where we are
    in parsing.  We rely on THD::where to accomplish this.  To
    improve performance there, we change the type of THD::where to
    be an enumeration, so we can avoid string comparisons during
    Item_name_const::fix_fields.  Consequently, this patch also
    changes all usages of THD::where to conform likewise.
    DaveGosselin-MariaDB committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    42b963a View commit details
    Browse the repository at this point in the history