mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
MDEV-36106 New-style hints: [NO_]DERIVED_CONDITION_PUSHDOWN, [NO_]MERGE
Implements and tests the optimizer hints DERIVED_CONDITION_PUSHDOWN and NO_DERIVED_CONDITION_PUSHDOWN, table-level hints to enable and disable, respectively, the condition pushdown for derived tables which is typically controlled by the condition_pushdown_for_derived optimizer switch. Implements and tests the optimizer hints MERGE and NO_MERGE, table-level hints to enable and disable, respectively, the derived_merge optimization which is typically controlled by the derived_merge optimizer switch. Sometimes hints need to be fixed before TABLE instances are available, but after TABLE_LIST instances have been created (as in the cases of MERGE and NO_MERGE). This commit introduces a new function called fix_hints_for_derived_table to allow early hint fixing for derived tables, using only a TABLE_LIST instance (so long as such hints are not index-level).
This commit is contained in:
committed by
Dave Gosselin
parent
e653666368
commit
2ee2e2d0f3
@@ -48,6 +48,8 @@ enum opt_hints_enum
|
||||
JOIN_SUFFIX_HINT_ENUM,
|
||||
JOIN_ORDER_HINT_ENUM,
|
||||
JOIN_FIXED_ORDER_HINT_ENUM,
|
||||
DERIVED_CONDITION_PUSHDOWN_HINT_ENUM,
|
||||
MERGE_HINT_ENUM,
|
||||
MAX_HINT_ENUM // This one must be the last in the list
|
||||
};
|
||||
|
||||
@@ -112,7 +114,11 @@ public:
|
||||
keyword_JOIN_PREFIX,
|
||||
keyword_JOIN_SUFFIX,
|
||||
keyword_JOIN_ORDER,
|
||||
keyword_JOIN_FIXED_ORDER
|
||||
keyword_JOIN_FIXED_ORDER,
|
||||
keyword_DERIVED_CONDITION_PUSHDOWN,
|
||||
keyword_NO_DERIVED_CONDITION_PUSHDOWN,
|
||||
keyword_MERGE,
|
||||
keyword_NO_MERGE
|
||||
};
|
||||
|
||||
class Token: public Lex_cstring
|
||||
@@ -363,7 +369,11 @@ private:
|
||||
return id == TokenID::keyword_BKA ||
|
||||
id == TokenID::keyword_BNL ||
|
||||
id == TokenID::keyword_NO_BKA ||
|
||||
id == TokenID::keyword_NO_BNL;
|
||||
id == TokenID::keyword_NO_BNL ||
|
||||
id == TokenID::keyword_DERIVED_CONDITION_PUSHDOWN ||
|
||||
id == TokenID::keyword_NO_DERIVED_CONDITION_PUSHDOWN ||
|
||||
id == TokenID::keyword_MERGE ||
|
||||
id == TokenID::keyword_NO_MERGE;
|
||||
}
|
||||
};
|
||||
class Table_level_hint_type: public TokenChoice<Parser,
|
||||
|
Reference in New Issue
Block a user