You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: mysql-test/main/sp.result
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8921,4 +8921,17 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
8921
8921
BEGIN
8922
8922
RETURN '';
8923
8923
END' at line 2
8924
+
#
8925
+
# MDEV-28220: Assert failure in sp_head::~sp_head on parsing a syntax incorrect statement CREATE SEQUENCE ... RESTART inside CREATE PROCEDURE/CREATE FUNCTION
8926
+
8927
+
# Specifying the RESTART clause for the statement CREATE SEQUENCE is a syntax error.
8928
+
# Check that CREATE PROCEDURE doesn't crash server if the statement
8929
+
# CREATE SEQUNCE ... RESTART is specified in its body.
8930
+
#
8931
+
CREATE PROCEDURE sp1() CREATE SEQUENCE s1 START WITH 300 INCREMENT BY 30 RESTART;
8932
+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RESTART' at line 1
8933
+
# CREATE SEQUNCE ... RESTART and CREATE SEQUNCE ... RESTART WITH ... are
8934
+
# handled by different grammar rules, so check the both cases.
8935
+
CREATE PROCEDURE sp1() CREATE SEQUENCE s1 START WITH 300 INCREMENT BY 30 RESTART WITH 100;
8936
+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RESTART' at line 1
0 commit comments