Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3, 10.4
-
None
Description
This script works fine:
DELIMITER $$
|
FOR i IN 1..3 DO |
SELECT i; |
END FOR; |
$$
|
DELIMITER ;
|
This script returns an error:
DELIMITER $$
|
FOR system_time IN 1..3 DO |
SELECT system_time; |
END FOR; |
$$
|
DELIMITER ;
|
ERROR 1064 (42000): You have an error in your SQL syntax...near 'system_time IN 1..3 DO
|
Looks wrong. It should work like the first script.
FOR SYSTEM_TIME should have a special meaning only in certain contexts.
In a FOR loop, SYSTEM_TIME should be treated like a normal index variable.