Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL)
-
None
Description
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 |
|
+------+
|
Attachments
Issue Links
- relates to
-
MDEV-16558 Parenthesized expression does not work as a lower FOR loop bound
- Open