-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 10.3
-
Component/s: Stored routines
-
Labels:None
DELIMITER $$
|
SET @v=0; |
FOR a IN (SELECT 1) .. 3 DO SET @v = @v + a; END FOR; |
$$
|
ERROR 1064 (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 '.. 3 DO SET @v = @v + a; END FOR' at line 1
|
If I use a subquery in the upper bound, it works fine:
DELIMITER $$
|
SET @v=0; |
FOR a IN 1 ..(SELECT 3) DO SET @v = @v + a; END FOR; |
SELECT @v; |
$$
|
+------+
|
| @v |
|
+------+
|
| 6 |
|
+------+
|
- relates to
-
MDEV-16558 Parenthesized expression does not work as a lower FOR loop bound
-
- Open
-