diff options
author | Dmitry Shulga <dmitry.shulga@mariadb.com> | 2022-04-02 16:43:51 +0700 |
---|---|---|
committer | Dmitry Shulga <dmitry.shulga@mariadb.com> | 2022-04-02 16:43:51 +0700 |
commit | 8c169f5e03441324d935b68335f0894ec51b0b60 (patch) | |
tree | b88093be0d11431f899661eeaca38d444499ccb9 /mysql-test/main/sp.test | |
parent | 49aee1a153a8401b0e8fc42bc73d7d42ab1be18d (diff) | |
download | mariadb-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 'mysql-test/main/sp.test')
-rw-r--r-- | mysql-test/main/sp.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test index f311baccd08..d167c1e8f73 100644 --- a/mysql-test/main/sp.test +++ b/mysql-test/main/sp.test @@ -10474,4 +10474,19 @@ END; $$ DELIMITER ;$$ +--echo # +--echo # MDEV-28220: Assert failure in sp_head::~sp_head on parsing a syntax incorrect statement CREATE SEQUENCE ... RESTART inside CREATE PROCEDURE/CREATE FUNCTION +--echo + +--echo # Specifying the RESTART clause for the statement CREATE SEQUENCE is a syntax error. +--echo # Check that CREATE PROCEDURE doesn't crash server if the statement +--echo # CREATE SEQUNCE ... RESTART is specified in its body. +--echo # +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() CREATE SEQUENCE s1 START WITH 300 INCREMENT BY 30 RESTART; +--echo # CREATE SEQUNCE ... RESTART and CREATE SEQUNCE ... RESTART WITH ... are +--echo # handled by different grammar rules, so check the both cases. +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() CREATE SEQUENCE s1 START WITH 300 INCREMENT BY 30 RESTART WITH 100; + --echo # End of 10.3 tests |