You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A rule to detect GET-FIRST/GET-LAST without an explicit lock would be nice.
Using this without a lock can lead to problems like error 2819 and other problems.
Quote from the doc:
The GET statement inherits its lock mode from
the most recent OPEN QUERY statement, unless you give a
lock-mode on the GET itself. So if you do an OPEN QUERY...
EXCLUSIVE-LOCK, and then do a subsequent GET on that
query, the GET will be EXCLUSIVE-LOCK too.
The GET-FIRST and GET-LAST methods use NO-LOCK by default, so I assume you're talking about the GET statement with a modifier on a static query ? e.g.
define query qry for customer.
open query for each customer.
get first qry. // Missing lock as it's not specified in the open query statement
get next qry. // Ditto
The GET-FIRST and GET-LAST methods use NO-LOCK by default, so I assume you're talking about the GET statement with a modifier on a static query ? e.g.
define query qry for customer.
open query for each customer.
get first qry. // Missing lock as it's not specified in the open query statement
get next qry. // Ditto
Yes, i typed the hyphen out of habit :D.
gquerret
changed the title
Detect GET-FIRST/GET-LAST without lock
Detect GET FIRST/GET LAST without lock
Nov 25, 2021
A rule to detect GET-FIRST/GET-LAST without an explicit lock would be nice.
Using this without a lock can lead to problems like error 2819 and other problems.
Quote from the doc:
#880 is a related i guess.
The text was updated successfully, but these errors were encountered: