Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.3.16
-
None
Description
Based on comment of a question in KB open question.
There is different result in 10.2 and 10.3 for REPEAT
stated here:
DELETE FROM t1; |
|
DELIMITER //
|
|
CREATE PROCEDURE dorepeat(p1 INT) |
BEGIN |
SET @x = 0; |
REPEAT
|
SET @x = @x + 1; |
INSERT INTO t1 VALUES (""); |
UNTIL @x >= p1
|
END REPEAT; |
END |
//
|
|
CALL dorepeat(100)//
|
|
SELECT @x// |
DELIMITER ;
|
SELECT * FROM t1; |
DROP TABLE t1; |
In 10.2 we are obtaining like so:
MariaDB [test]> SELECT @x// |
+------+ |
| @x |
|
+------+ |
| 100 |
|
+------+ |
1 row in set (0.001 sec) |
and in 10.3 we are obtaining bug (one more iteration), like so:
MariaDB [test]> SELECT @x// |
+------+ |
| @x |
|
+------+ |
| 101 |
|
+------+ |
1 row in set (0.000 sec) |
|