summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2022-04-02 16:43:51 +0700
committerDmitry Shulga <dmitry.shulga@mariadb.com>2022-04-02 16:43:51 +0700
commit8c169f5e03441324d935b68335f0894ec51b0b60 (patch)
treeb88093be0d11431f899661eeaca38d444499ccb9 /sql/sql_yacc.yy
parent49aee1a153a8401b0e8fc42bc73d7d42ab1be18d (diff)
downloadmariadb-git-8c169f5e03441324d935b68335f0894ec51b0b60.tar.gz
MDEV-28220: Assert failure in sp_head::~sp_head on parsing a syntax incorrect statement CREATE SEQUENCE ... RESTART inside CREATE PROCEDURE/CREATE FUNCTION
This bug report is about the same issue as MDEV-28129 and MDEV-21173. The issue is that the macros YYABORT is called instead of MYSQL_YYABORT on parse error. In result the method LEX::cleanup_lex_after_parse_error is not called to clean up data structures created on parsing of the statement.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index a427c7a40c5..3770488f3f4 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -3037,7 +3037,7 @@ sequence_def:
if (unlikely(Lex->sql_command != SQLCOM_ALTER_SEQUENCE))
{
thd->parse_error(ER_SYNTAX_ERROR, "RESTART");
- YYABORT;
+ MYSQL_YYABORT;
}
if (unlikely(Lex->create_info.seq_create_info->used_fields &
seq_field_used_restart))
@@ -3049,7 +3049,7 @@ sequence_def:
if (unlikely(Lex->sql_command != SQLCOM_ALTER_SEQUENCE))
{
thd->parse_error(ER_SYNTAX_ERROR, "RESTART");
- YYABORT;
+ MYSQL_YYABORT;
}
if (unlikely(Lex->create_info.seq_create_info->used_fields &
seq_field_used_restart))