summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-09-20 10:36:20 +0400
committerAlexander Barkov <bar@mariadb.com>2019-09-20 10:36:20 +0400
commit2f88bd2da26abd30b027308aedc30989c039d518 (patch)
tree46154ab8b7b906727cf9c0832aa05b5017eb02fd /sql/sql_lex.h
parentb9dea911bf8e3d4d8fc57ce3ef15ab0e2ab4d076 (diff)
downloadmariadb-git-2f88bd2da26abd30b027308aedc30989c039d518.tar.gz
MDEV-20634 Report disallowed subquery errors as such (instead of parse error)
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index d351378a9a6..8296f9e2dec 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -3267,10 +3267,10 @@ public:
/*
Usually `expr` rule of yacc is quite reused but some commands better
not support subqueries which comes standard with this rule, like
- KILL, HA_READ, CREATE/ALTER EVENT etc. Set this to `false` to get
- syntax error back.
+ KILL, HA_READ, CREATE/ALTER EVENT etc. Set this to a non-NULL
+ clause name to get an error.
*/
- bool expr_allows_subselect;
+ const char *clause_that_disallows_subselect;
bool selects_allow_into;
bool selects_allow_procedure;
/*
@@ -3988,9 +3988,7 @@ public:
const Lex_ident_cli_st *var_name,
const Lex_ident_cli_st *field_name);
- Item *create_item_query_expression(THD *thd,
- const char *tok_start,
- st_select_lex_unit *unit);
+ Item *create_item_query_expression(THD *thd, st_select_lex_unit *unit);
Item *make_item_func_replace(THD *thd, Item *org, Item *find, Item *replace);
Item *make_item_func_substr(THD *thd, Item *a, Item *b, Item *c);
@@ -4460,7 +4458,7 @@ public:
bool parsed_body_unit(SELECT_LEX_UNIT *unit);
SELECT_LEX_UNIT *parsed_body_unit_tail(SELECT_LEX_UNIT *unit,
Lex_order_limit_lock * l);
- SELECT_LEX *parsed_subselect(SELECT_LEX_UNIT *unit, char *place);
+ SELECT_LEX *parsed_subselect(SELECT_LEX_UNIT *unit);
bool parsed_insert_select(SELECT_LEX *firs_select);
bool parsed_TVC_start();
SELECT_LEX *parsed_TVC_end();