Firebird Documentation Index → Firebird 3.0.6 Release Notes → Procedural SQL (PSQL) → PSQL Cursor Stabilization |
PSQL cursors without SUSPEND inside are now stable:
FOR SELECT ID FROM T WHERE VAL IS NULL INTO :ID DO BEGIN UPDATE T SET VAL = 1 WHERE ID = :ID; END
Previously, this block would loop interminably. Now, the loop will not select the value if it was set within the loop.
This could change the behaviour of legacy code.
If there is a SUSPEND inside the block, the old instability remains: this query, for example, still produces the infinite loop:
FOR SELECT ID FROM T INTO :ID DO BEGIN INSERT INTO T (ID) VALUES (:ID); SUSPEND; END
Firebird Documentation Index → Firebird 3.0.6 Release Notes → Procedural SQL (PSQL) → PSQL Cursor Stabilization |