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:
@ -775,6 +775,18 @@ SELECT @v;
|
||||
6
|
||||
DROP PROCEDURE p1;
|
||||
# Testing the FOR loop statement
|
||||
CREATE TABLE t1 (a INT);
|
||||
FOR i IN 1 .. 3
|
||||
LOOP
|
||||
INSERT INTO t1 VALUES (i);
|
||||
END LOOP;
|
||||
/
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
DROP TABLE t1;
|
||||
CREATE FUNCTION f1 (lower_bound INT, upper_bound INT, lim INT) RETURN INT
|
||||
AS
|
||||
total INT := 0;
|
||||
|
Reference in New Issue
Block a user