MySQL 9.1.0
Source Code Documentation
|
#include <assert.h>
#include <climits>
#include <cstdlib>
#include "lex_string.h"
#include "m_string.h"
#include "my_double2ulonglong.h"
#include "my_inttypes.h"
#include "mysqld_error.h"
#include "sql/derror.h"
#include "sql/item.h"
#include "sql/item_subselect.h"
#include "sql/lexer_yystype.h"
#include "sql/opt_hints.h"
#include "sql/parse_tree_helpers.h"
#include "sql/parse_tree_hints.h"
#include "sql/parser_yystype.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_error.h"
#include "sql/sql_hints.yy.h"
#include "sql/sql_lex_hints.h"
#include <stddef.h>
#include <stdlib.h>
Macros | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "3.0.4" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 1 |
#define | YYPUSH 0 |
#define | YYPULL 1 |
#define | YYSTYPE MY_HINT_PARSER_STYPE |
#define | yyparse my_hint_parser_parse |
#define | yylex my_hint_parser_lex |
#define | yyerror my_hint_parser_error |
#define | yydebug my_hint_parser_debug |
#define | yynerrs my_hint_parser_nerrs |
#define | NEW_PTN new (thd->mem_root) |
#define | yysymbol_kind_t my_hint_parser_symbol_kind_t |
#define | YY_NULLPTR 0 |
#define | YYERROR_VERBOSE 0 |
#define | YY_MY_HINT_PARSER_VAR_LIB_PB2_SB_1_16989051_1727178077_49_DIST_GPL_SQL_SQL_HINTS_YY_H_INCLUDED |
#define | MAX_EXECUTION_TIME_HINT 1000 |
#define | RESOURCE_GROUP_HINT 1001 |
#define | BKA_HINT 1002 |
#define | BNL_HINT 1003 |
#define | DUPSWEEDOUT_HINT 1004 |
#define | FIRSTMATCH_HINT 1005 |
#define | INTOEXISTS_HINT 1006 |
#define | LOOSESCAN_HINT 1007 |
#define | MATERIALIZATION_HINT 1008 |
#define | NO_BKA_HINT 1009 |
#define | NO_BNL_HINT 1010 |
#define | NO_ICP_HINT 1011 |
#define | NO_MRR_HINT 1012 |
#define | NO_RANGE_OPTIMIZATION_HINT 1013 |
#define | NO_SEMIJOIN_HINT 1014 |
#define | MRR_HINT 1015 |
#define | QB_NAME_HINT 1016 |
#define | SEMIJOIN_HINT 1017 |
#define | SUBQUERY_HINT 1018 |
#define | DERIVED_MERGE_HINT 1019 |
#define | NO_DERIVED_MERGE_HINT 1020 |
#define | JOIN_PREFIX_HINT 1021 |
#define | JOIN_SUFFIX_HINT 1022 |
#define | JOIN_ORDER_HINT 1023 |
#define | JOIN_FIXED_ORDER_HINT 1024 |
#define | INDEX_MERGE_HINT 1025 |
#define | NO_INDEX_MERGE_HINT 1026 |
#define | SET_VAR_HINT 1027 |
#define | SKIP_SCAN_HINT 1028 |
#define | NO_SKIP_SCAN_HINT 1029 |
#define | HASH_JOIN_HINT 1030 |
#define | NO_HASH_JOIN_HINT 1031 |
#define | HINT_ARG_NUMBER 1032 |
#define | HINT_ARG_IDENT 1033 |
#define | HINT_ARG_QB_NAME 1034 |
#define | HINT_ARG_TEXT 1035 |
#define | HINT_IDENT_OR_NUMBER_WITH_SCALE 1036 |
#define | HINT_CLOSE 1037 |
#define | HINT_ERROR 1038 |
#define | INDEX_HINT 1039 |
#define | NO_INDEX_HINT 1040 |
#define | JOIN_INDEX_HINT 1041 |
#define | NO_JOIN_INDEX_HINT 1042 |
#define | GROUP_INDEX_HINT 1043 |
#define | NO_GROUP_INDEX_HINT 1044 |
#define | ORDER_INDEX_HINT 1045 |
#define | NO_ORDER_INDEX_HINT 1046 |
#define | DERIVED_CONDITION_PUSHDOWN_HINT 1047 |
#define | NO_DERIVED_CONDITION_PUSHDOWN_HINT 1048 |
#define | HINT_ARG_FLOATING_POINT_NUMBER 1049 |
#define | YYSIZE_T size_t |
#define | YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define | YY_(Msgid) Msgid |
#define | YY_ATTRIBUTE(Spec) /* empty */ |
#define | YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
#define | YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
#define | _Noreturn YY_ATTRIBUTE ((__noreturn__)) |
#define | YYUSE(E) ((void) (E)) |
#define | YY_INITIAL_VALUE(Value) Value |
#define | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
#define | YY_IGNORE_MAYBE_UNINITIALIZED_END |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | EXIT_SUCCESS 0 |
#define | YYMALLOC malloc |
#define | YYFREE free |
#define | YYFINAL 65 |
#define | YYLAST 178 |
#define | YYNTOKENS 57 |
#define | YYNNTS 34 |
#define | YYNRULES 97 |
#define | YYNSTATES 165 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 1050 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -65 |
#define | yypact_value_is_default(Yystate) (!!((Yystate) == (-65))) |
#define | YYTABLE_NINF -1 |
#define | yytable_value_is_error(Yytable_value) 0 |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Type, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Typedefs | |
typedef unsigned char | yytype_uint8 |
typedef signed char | yytype_int8 |
typedef unsigned short int | yytype_uint16 |
typedef short int | yytype_int16 |
Functions | |
static bool | parse_int (longlong *to, const char *from, size_t from_length) |
int | my_hint_parser_parse (class THD *thd, class Hint_scanner *scanner, class PT_hint_list **ret) |
static void | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, class THD *thd, class Hint_scanner *scanner, class PT_hint_list **ret) |
int | yyparse (class THD *thd, class Hint_scanner *scanner, class PT_hint_list **ret) |
Variables | |
static const yytype_uint8 | yytranslate [] |
static const yytype_int8 | yypact [] |
static const yytype_uint8 | yydefact [] |
static const yytype_int8 | yypgoto [] |
static const yytype_int16 | yydefgoto [] |
static const yytype_uint8 | yytable [] |
static const yytype_int16 | yycheck [] |
static const yytype_uint8 | yystos [] |
static const yytype_uint8 | yyr1 [] |
static const yytype_uint8 | yyr2 [] |
#define _Noreturn YY_ATTRIBUTE ((__noreturn__)) |
#define BKA_HINT 1002 |
#define BNL_HINT 1003 |
#define DERIVED_CONDITION_PUSHDOWN_HINT 1047 |
#define DERIVED_MERGE_HINT 1019 |
#define DUPSWEEDOUT_HINT 1004 |
#define EXIT_SUCCESS 0 |
#define FIRSTMATCH_HINT 1005 |
#define GROUP_INDEX_HINT 1043 |
#define HASH_JOIN_HINT 1030 |
#define HINT_ARG_FLOATING_POINT_NUMBER 1049 |
#define HINT_ARG_IDENT 1033 |
#define HINT_ARG_NUMBER 1032 |
#define HINT_ARG_QB_NAME 1034 |
#define HINT_ARG_TEXT 1035 |
#define HINT_CLOSE 1037 |
#define HINT_ERROR 1038 |
#define HINT_IDENT_OR_NUMBER_WITH_SCALE 1036 |
#define INDEX_HINT 1039 |
#define INDEX_MERGE_HINT 1025 |
#define INTOEXISTS_HINT 1006 |
#define JOIN_FIXED_ORDER_HINT 1024 |
#define JOIN_INDEX_HINT 1041 |
#define JOIN_ORDER_HINT 1023 |
#define JOIN_PREFIX_HINT 1021 |
#define JOIN_SUFFIX_HINT 1022 |
#define LOOSESCAN_HINT 1007 |
#define MATERIALIZATION_HINT 1008 |
#define MAX_EXECUTION_TIME_HINT 1000 |
#define MRR_HINT 1015 |
#define NEW_PTN new (thd->mem_root) |
#define NO_BKA_HINT 1009 |
#define NO_BNL_HINT 1010 |
#define NO_DERIVED_CONDITION_PUSHDOWN_HINT 1048 |
#define NO_DERIVED_MERGE_HINT 1020 |
#define NO_GROUP_INDEX_HINT 1044 |
#define NO_HASH_JOIN_HINT 1031 |
#define NO_ICP_HINT 1011 |
#define NO_INDEX_HINT 1040 |
#define NO_INDEX_MERGE_HINT 1026 |
#define NO_JOIN_INDEX_HINT 1042 |
#define NO_MRR_HINT 1012 |
#define NO_ORDER_INDEX_HINT 1046 |
#define NO_RANGE_OPTIMIZATION_HINT 1013 |
#define NO_SEMIJOIN_HINT 1014 |
#define NO_SKIP_SCAN_HINT 1029 |
#define ORDER_INDEX_HINT 1045 |
#define QB_NAME_HINT 1016 |
#define RESOURCE_GROUP_HINT 1001 |
#define SEMIJOIN_HINT 1017 |
#define SET_VAR_HINT 1027 |
#define SKIP_SCAN_HINT 1028 |
#define SUBQUERY_HINT 1018 |
#define YY_ | ( | Msgid | ) | Msgid |
#define YY_ATTRIBUTE | ( | Spec | ) | /* empty */ |
#define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
#define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
#define YY_IGNORE_MAYBE_UNINITIALIZED_END |
#define YY_INITIAL_VALUE | ( | Value | ) | Value |
#define YY_MY_HINT_PARSER_VAR_LIB_PB2_SB_1_16989051_1727178077_49_DIST_GPL_SQL_SQL_HINTS_YY_H_INCLUDED |
#define YY_NULLPTR 0 |
#define YY_REDUCE_PRINT | ( | Rule | ) |
#define YY_STACK_PRINT | ( | Bottom, | |
Top | |||
) |
#define YY_SYMBOL_PRINT | ( | Title, | |
Type, | |||
Value, | |||
Location | |||
) |
#define YYABORT goto yyabortlab |
#define YYACCEPT goto yyacceptlab |
#define YYBACKUP | ( | Token, | |
Value | |||
) |
#define YYBISON 1 |
#define YYBISON_VERSION "3.0.4" |
#define yydebug my_hint_parser_debug |
#define YYDPRINTF | ( | Args | ) |
#define YYEMPTY (-2) |
#define YYEOF 0 |
#define YYERRCODE 256 |
#define yyerrok (yyerrstatus = 0) |
#define yyerror my_hint_parser_error |
#define YYERROR goto yyerrorlab |
#define YYERROR_VERBOSE 0 |
#define YYFINAL 65 |
#define YYFREE free |
#define YYINITDEPTH 200 |
#define YYLAST 178 |
#define yylex | ( | void | ) | my_hint_parser_lex |
#define YYMALLOC malloc |
#define YYMAXDEPTH 10000 |
#define YYMAXUTOK 1050 |
#define yynerrs my_hint_parser_nerrs |
#define YYNNTS 34 |
#define YYNRULES 97 |
#define YYNSTATES 165 |
#define YYNTOKENS 57 |
#define YYPACT_NINF -65 |
#define yypact_value_is_default | ( | Yystate | ) | (!!((Yystate) == (-65))) |
int yyparse | ( | void | ) | my_hint_parser_parse |
#define YYPOPSTACK | ( | N | ) | (yyvsp -= (N), yyssp -= (N)) |
#define YYPULL 1 |
#define YYPURE 1 |
#define YYPUSH 0 |
#define YYRECOVERING | ( | ) | (!!yyerrstatus) |
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define YYSIZE_T size_t |
#define YYSKELETON_NAME "yacc.c" |
#define YYSTACK_ALLOC YYMALLOC |
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define YYSTACK_FREE YYFREE |
#define YYSTYPE MY_HINT_PARSER_STYPE |
#define yysymbol_kind_t my_hint_parser_symbol_kind_t |
#define YYTABLE_NINF -1 |
#define yytable_value_is_error | ( | Yytable_value | ) | 0 |
#define YYTERROR 1 |
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define YYUNDEFTOK 2 |
#define YYUSE | ( | E | ) | ((void) (E)) |
typedef short int yytype_int16 |
typedef signed char yytype_int8 |
typedef unsigned short int yytype_uint16 |
typedef unsigned char yytype_uint8 |
int my_hint_parser_parse | ( | class THD * | thd, |
class Hint_scanner * | scanner, | ||
class PT_hint_list ** | ret | ||
) |
|
static |
|
static |
int yyparse | ( | class THD * | thd, |
class Hint_scanner * | scanner, | ||
class PT_hint_list ** | ret | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |