diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index a6c626aef92..f4c4f044be2 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2010, 2020, MariaDB + Copyright (c) 2010, 2021, MariaDB 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 @@ -4678,10 +4678,13 @@ create_like: opt_create_select: /* empty */ {} - | opt_duplicate opt_as create_select_query_expression opt_versioning_option - { - Lex->create_info.add(DDL_options_st::OPT_CREATE_SELECT); - } + | opt_duplicate opt_as create_select_query_expression + opt_versioning_option + { + Lex->create_info.add(DDL_options_st::OPT_CREATE_SELECT); + if (Lex->check_cte_dependencies_and_resolve_references()) + MYSQL_YYABORT; + } ; create_select_query_expression: @@ -13569,7 +13572,10 @@ delete: lex->first_select_lex()->order_list.empty(); } delete_part2 - { } + { + if (Lex->check_cte_dependencies_and_resolve_references()) + MYSQL_YYABORT; + } ; opt_delete_system_time: |