1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-10580 sql_mode=ORACLE: FOR loop statement

Fixed a crash when trying to use a FOR loop as a compound statement
outside of an SP. A bug in 051e415d8a251bd70e9b73619dbcc40f3c65371d.
This commit is contained in:
Alexander Barkov
2016-08-31 08:03:34 +04:00
parent 30bec863cf
commit bf573e21c7
3 changed files with 26 additions and 0 deletions

View File

@ -847,6 +847,18 @@ DROP PROCEDURE p1;
--echo # Testing the FOR loop statement
CREATE TABLE t1 (a INT);
DELIMITER /;
FOR i IN 1 .. 3
LOOP
INSERT INTO t1 VALUES (i);
END LOOP;
/
DELIMITER ;/
SELECT * FROM t1;
DROP TABLE t1;
DELIMITER /;
--error ER_PARSE_ERROR
CREATE FUNCTION f1 (lower_bound INT, upper_bound INT, lim INT) RETURN INT