File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
sql/mysql/Positive-Technologies Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -901,7 +901,8 @@ replaceStatement
901901selectStatement
902902 : querySpecification lockClause? #simpleSelect
903903 | queryExpression lockClause? #parenthesisSelect
904- | querySpecificationNointo unionStatement+
904+ | (querySpecificationNointo | queryExpressionNointo)
905+ unionStatement+
905906 (
906907 UNION unionType=(ALL | DISTINCT )?
907908 (querySpecification | queryExpression)
Original file line number Diff line number Diff line change @@ -683,3 +683,34 @@ SELECT
683683 ,@N_latin;
684684END
685685# end
686+
687+ # begin
688+ CREATE PROCEDURE test_union()
689+ BEGIN
690+ (SELECT id FROM test_auto_inc)
691+ UNION ALL
692+ SELECT id FROM test_auto_inc;
693+ END
694+ # end
695+
696+ # begin
697+ CREATE PROCEDURE test_union()
698+ BEGIN
699+ (SELECT id FROM test_auto_inc)
700+ UNION ALL
701+ SELECT id FROM test_auto_inc
702+ UNION ALL
703+ SELECT id FROM test_auto_inc ORDER BY id;
704+ END
705+ # end
706+
707+ # begin
708+ CREATE PROCEDURE test_union()
709+ BEGIN
710+ (SELECT id FROM test_auto_inc)
711+ UNION ALL
712+ (SELECT id FROM test_auto_inc)
713+ UNION ALL
714+ SELECT id FROM test_auto_inc ORDER BY id;
715+ END
716+ # end
You can’t perform that action at this time.
0 commit comments