Commit 15363a4f authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove pars_stored_procedure_call()

The InnoDB internal SQL parser never supported this syntax.
parent 92046ba2
/* A Bison parser, made by GNU Bison 3.4.2. */
/* A Bison parser, made by GNU Bison 3.7.6. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
......@@ -16,7 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
......@@ -31,8 +31,9 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Undocumented macros, especially those whose name start with YY_,
are private implementation details. Do not rely on them. */
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
especially those whose name start with YY_ or yy_. They are
private implementation details that can be changed or removed. */
#ifndef YY_YY_PARS0GRM_TAB_H_INCLUDED
# define YY_YY_PARS0GRM_TAB_H_INCLUDED
......@@ -44,90 +45,95 @@
extern int yydebug;
#endif
/* Token type. */
/* Token kinds. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
PARS_INT_LIT = 258,
PARS_FLOAT_LIT = 259,
PARS_STR_LIT = 260,
PARS_NULL_LIT = 261,
PARS_ID_TOKEN = 262,
PARS_AND_TOKEN = 263,
PARS_OR_TOKEN = 264,
PARS_NOT_TOKEN = 265,
PARS_GE_TOKEN = 266,
PARS_LE_TOKEN = 267,
PARS_NE_TOKEN = 268,
PARS_PROCEDURE_TOKEN = 269,
PARS_IN_TOKEN = 270,
PARS_INT_TOKEN = 271,
PARS_CHAR_TOKEN = 272,
PARS_IS_TOKEN = 273,
PARS_BEGIN_TOKEN = 274,
PARS_END_TOKEN = 275,
PARS_IF_TOKEN = 276,
PARS_THEN_TOKEN = 277,
PARS_ELSE_TOKEN = 278,
PARS_ELSIF_TOKEN = 279,
PARS_LOOP_TOKEN = 280,
PARS_WHILE_TOKEN = 281,
PARS_RETURN_TOKEN = 282,
PARS_SELECT_TOKEN = 283,
PARS_COUNT_TOKEN = 284,
PARS_FROM_TOKEN = 285,
PARS_WHERE_TOKEN = 286,
PARS_FOR_TOKEN = 287,
PARS_DDOT_TOKEN = 288,
PARS_ORDER_TOKEN = 289,
PARS_BY_TOKEN = 290,
PARS_ASC_TOKEN = 291,
PARS_DESC_TOKEN = 292,
PARS_INSERT_TOKEN = 293,
PARS_INTO_TOKEN = 294,
PARS_VALUES_TOKEN = 295,
PARS_UPDATE_TOKEN = 296,
PARS_SET_TOKEN = 297,
PARS_DELETE_TOKEN = 298,
PARS_CURRENT_TOKEN = 299,
PARS_OF_TOKEN = 300,
PARS_CREATE_TOKEN = 301,
PARS_TABLE_TOKEN = 302,
PARS_INDEX_TOKEN = 303,
PARS_UNIQUE_TOKEN = 304,
PARS_CLUSTERED_TOKEN = 305,
PARS_ON_TOKEN = 306,
PARS_ASSIGN_TOKEN = 307,
PARS_DECLARE_TOKEN = 308,
PARS_CURSOR_TOKEN = 309,
PARS_SQL_TOKEN = 310,
PARS_OPEN_TOKEN = 311,
PARS_FETCH_TOKEN = 312,
PARS_CLOSE_TOKEN = 313,
PARS_NOTFOUND_TOKEN = 314,
PARS_TO_BINARY_TOKEN = 315,
PARS_SUBSTR_TOKEN = 316,
PARS_CONCAT_TOKEN = 317,
PARS_INSTR_TOKEN = 318,
PARS_LENGTH_TOKEN = 319,
PARS_COMMIT_TOKEN = 320,
PARS_ROLLBACK_TOKEN = 321,
PARS_WORK_TOKEN = 322,
PARS_EXIT_TOKEN = 323,
PARS_FUNCTION_TOKEN = 324,
PARS_LOCK_TOKEN = 325,
PARS_SHARE_TOKEN = 326,
PARS_MODE_TOKEN = 327,
PARS_LIKE_TOKEN = 328,
PARS_LIKE_TOKEN_EXACT = 329,
PARS_LIKE_TOKEN_PREFIX = 330,
PARS_LIKE_TOKEN_SUFFIX = 331,
PARS_LIKE_TOKEN_SUBSTR = 332,
PARS_TABLE_NAME_TOKEN = 333,
PARS_BIGINT_TOKEN = 334,
NEG = 335
YYEMPTY = -2,
YYEOF = 0, /* "end of file" */
YYerror = 256, /* error */
YYUNDEF = 257, /* "invalid token" */
PARS_INT_LIT = 258, /* PARS_INT_LIT */
PARS_FLOAT_LIT = 259, /* PARS_FLOAT_LIT */
PARS_STR_LIT = 260, /* PARS_STR_LIT */
PARS_NULL_LIT = 261, /* PARS_NULL_LIT */
PARS_ID_TOKEN = 262, /* PARS_ID_TOKEN */
PARS_AND_TOKEN = 263, /* PARS_AND_TOKEN */
PARS_OR_TOKEN = 264, /* PARS_OR_TOKEN */
PARS_NOT_TOKEN = 265, /* PARS_NOT_TOKEN */
PARS_GE_TOKEN = 266, /* PARS_GE_TOKEN */
PARS_LE_TOKEN = 267, /* PARS_LE_TOKEN */
PARS_NE_TOKEN = 268, /* PARS_NE_TOKEN */
PARS_PROCEDURE_TOKEN = 269, /* PARS_PROCEDURE_TOKEN */
PARS_IN_TOKEN = 270, /* PARS_IN_TOKEN */
PARS_INT_TOKEN = 271, /* PARS_INT_TOKEN */
PARS_CHAR_TOKEN = 272, /* PARS_CHAR_TOKEN */
PARS_IS_TOKEN = 273, /* PARS_IS_TOKEN */
PARS_BEGIN_TOKEN = 274, /* PARS_BEGIN_TOKEN */
PARS_END_TOKEN = 275, /* PARS_END_TOKEN */
PARS_IF_TOKEN = 276, /* PARS_IF_TOKEN */
PARS_THEN_TOKEN = 277, /* PARS_THEN_TOKEN */
PARS_ELSE_TOKEN = 278, /* PARS_ELSE_TOKEN */
PARS_ELSIF_TOKEN = 279, /* PARS_ELSIF_TOKEN */
PARS_LOOP_TOKEN = 280, /* PARS_LOOP_TOKEN */
PARS_WHILE_TOKEN = 281, /* PARS_WHILE_TOKEN */
PARS_RETURN_TOKEN = 282, /* PARS_RETURN_TOKEN */
PARS_SELECT_TOKEN = 283, /* PARS_SELECT_TOKEN */
PARS_COUNT_TOKEN = 284, /* PARS_COUNT_TOKEN */
PARS_FROM_TOKEN = 285, /* PARS_FROM_TOKEN */
PARS_WHERE_TOKEN = 286, /* PARS_WHERE_TOKEN */
PARS_FOR_TOKEN = 287, /* PARS_FOR_TOKEN */
PARS_DDOT_TOKEN = 288, /* PARS_DDOT_TOKEN */
PARS_ORDER_TOKEN = 289, /* PARS_ORDER_TOKEN */
PARS_BY_TOKEN = 290, /* PARS_BY_TOKEN */
PARS_ASC_TOKEN = 291, /* PARS_ASC_TOKEN */
PARS_DESC_TOKEN = 292, /* PARS_DESC_TOKEN */
PARS_INSERT_TOKEN = 293, /* PARS_INSERT_TOKEN */
PARS_INTO_TOKEN = 294, /* PARS_INTO_TOKEN */
PARS_VALUES_TOKEN = 295, /* PARS_VALUES_TOKEN */
PARS_UPDATE_TOKEN = 296, /* PARS_UPDATE_TOKEN */
PARS_SET_TOKEN = 297, /* PARS_SET_TOKEN */
PARS_DELETE_TOKEN = 298, /* PARS_DELETE_TOKEN */
PARS_CURRENT_TOKEN = 299, /* PARS_CURRENT_TOKEN */
PARS_OF_TOKEN = 300, /* PARS_OF_TOKEN */
PARS_CREATE_TOKEN = 301, /* PARS_CREATE_TOKEN */
PARS_TABLE_TOKEN = 302, /* PARS_TABLE_TOKEN */
PARS_INDEX_TOKEN = 303, /* PARS_INDEX_TOKEN */
PARS_UNIQUE_TOKEN = 304, /* PARS_UNIQUE_TOKEN */
PARS_CLUSTERED_TOKEN = 305, /* PARS_CLUSTERED_TOKEN */
PARS_ON_TOKEN = 306, /* PARS_ON_TOKEN */
PARS_ASSIGN_TOKEN = 307, /* PARS_ASSIGN_TOKEN */
PARS_DECLARE_TOKEN = 308, /* PARS_DECLARE_TOKEN */
PARS_CURSOR_TOKEN = 309, /* PARS_CURSOR_TOKEN */
PARS_SQL_TOKEN = 310, /* PARS_SQL_TOKEN */
PARS_OPEN_TOKEN = 311, /* PARS_OPEN_TOKEN */
PARS_FETCH_TOKEN = 312, /* PARS_FETCH_TOKEN */
PARS_CLOSE_TOKEN = 313, /* PARS_CLOSE_TOKEN */
PARS_NOTFOUND_TOKEN = 314, /* PARS_NOTFOUND_TOKEN */
PARS_TO_BINARY_TOKEN = 315, /* PARS_TO_BINARY_TOKEN */
PARS_SUBSTR_TOKEN = 316, /* PARS_SUBSTR_TOKEN */
PARS_CONCAT_TOKEN = 317, /* PARS_CONCAT_TOKEN */
PARS_INSTR_TOKEN = 318, /* PARS_INSTR_TOKEN */
PARS_LENGTH_TOKEN = 319, /* PARS_LENGTH_TOKEN */
PARS_COMMIT_TOKEN = 320, /* PARS_COMMIT_TOKEN */
PARS_ROLLBACK_TOKEN = 321, /* PARS_ROLLBACK_TOKEN */
PARS_WORK_TOKEN = 322, /* PARS_WORK_TOKEN */
PARS_EXIT_TOKEN = 323, /* PARS_EXIT_TOKEN */
PARS_FUNCTION_TOKEN = 324, /* PARS_FUNCTION_TOKEN */
PARS_LOCK_TOKEN = 325, /* PARS_LOCK_TOKEN */
PARS_SHARE_TOKEN = 326, /* PARS_SHARE_TOKEN */
PARS_MODE_TOKEN = 327, /* PARS_MODE_TOKEN */
PARS_LIKE_TOKEN = 328, /* PARS_LIKE_TOKEN */
PARS_LIKE_TOKEN_EXACT = 329, /* PARS_LIKE_TOKEN_EXACT */
PARS_LIKE_TOKEN_PREFIX = 330, /* PARS_LIKE_TOKEN_PREFIX */
PARS_LIKE_TOKEN_SUFFIX = 331, /* PARS_LIKE_TOKEN_SUFFIX */
PARS_LIKE_TOKEN_SUBSTR = 332, /* PARS_LIKE_TOKEN_SUBSTR */
PARS_TABLE_NAME_TOKEN = 333, /* PARS_TABLE_NAME_TOKEN */
PARS_BIGINT_TOKEN = 334, /* PARS_BIGINT_TOKEN */
NEG = 335 /* NEG */
};
typedef enum yytokentype yytoken_kind_t;
#endif
/* Value type. */
......
......@@ -367,16 +367,6 @@ pars_procedure_definition(
table */
que_node_t* stat_list); /*!< in: statement list */
/*************************************************************//**
Parses a stored procedure call, when this is not within another stored
procedure, that is, the client issues a procedure call directly.
In MySQL/InnoDB, stored InnoDB procedures are invoked via the
parsed procedure tree, not via InnoDB SQL, so this function is not used.
@return query graph */
que_fork_t*
pars_stored_procedure_call(
/*=======================*/
sym_node_t* sym_node); /*!< in: stored procedure name */
/** Completes a query graph by adding query thread and fork nodes
above it and prepares the graph for running.
@param[in] node root node for an incomplete query
......
......@@ -25,6 +25,7 @@ mv pars0grm.tab.h ../include/pars0grm.h
sed -e '
s/'"$TMPFILE"'/'"$OUTFILE"'/;
s/'"pars0grm.tab.h"'/'"pars0grm.h"'/;
s/^\(\(YYSTYPE\|int\) yy\(char\|nerrs\)\)/static \1/;
' < "$TMPFILE" > "$OUTFILE"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*****************************************************************************
Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2019, MariaDB Corporation.
Copyright (c) 2017, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -140,8 +140,7 @@ top_statement:
procedure_definition ';'
statement:
stored_procedure_call
| while_statement ';'
while_statement ';'
| for_statement ';'
| exit_statement ';'
| if_statement ';'
......@@ -208,18 +207,6 @@ function_name:
| PARS_LENGTH_TOKEN { $$ = &pars_length_token; }
;
question_mark_list:
/* Nothing */
| '?'
| question_mark_list ',' '?'
;
stored_procedure_call:
'{' PARS_ID_TOKEN '(' question_mark_list ')' '}'
{ $$ = pars_stored_procedure_call(
static_cast<sym_node_t*>($2)); }
;
user_function_call:
PARS_ID_TOKEN '(' ')' { $$ = $1; }
;
......
......@@ -1915,22 +1915,6 @@ pars_procedure_definition(
return(fork);
}
/*************************************************************//**
Parses a stored procedure call, when this is not within another stored
procedure, that is, the client issues a procedure call directly.
In MySQL/InnoDB, stored InnoDB procedures are invoked via the
parsed procedure tree, not via InnoDB SQL, so this function is not used.
@return query graph */
que_fork_t*
pars_stored_procedure_call(
/*=======================*/
sym_node_t* sym_node MY_ATTRIBUTE((unused)))
/*!< in: stored procedure name */
{
ut_error;
return(NULL);
}
/*************************************************************//**
Retrieves characters to the lexical analyzer. */
int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment