Comments - MariaDB For Loop
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Hi,
well, you didn't specify which version you are using.
Looking from documentation for FOR loop, seems like
FOR
loop is introduced in10.3
, so if you are using it you can safely say:But if you want you can create a procedure and use
REPEAT
loop, like here:In 10.2 we are obtaining like so:
and in 10.3 we are obtaining bug (one more iteration, will investigate more in MDEV-19905), like so:
Workaround in this case is to use
99
calls ofdorepeat
.