ttlock

[NO-]LOCK on TEMP-TABLE|WORK-TABLE has no effect

Rule "ttlock" is part of an effort to clean up source code by eliminating useless commands.
A locking statement (NO-LOCK, EXCLUSIVE-LOCK, SHARE-LOCK) has no effect when applied to temp-table and work-tables, so perhaps it should be taken out.


def temp-table tttest no-undo 
    field x as char. 

def temp-table tttest1 no-undo 
    field y as char. 

/* All statements below will be reported by ProLint */ 
repeat preselect each tttest no-lock, each tttest1 where tttest1.y = tttest.x exclusive-lock: 
    find next tttest1. 
    display y. 
end. 

find first tttest exclusive-lock. 

if not can-find(first tttest1 share-lock) then return. 

Notes:

  • Dynamic queries (bufferHandle:FIND-FIRST()) are not checked at this point.
  • Operations checked are FOR, FIND, CAN-FIND, PRESELECT
  • Does not look at OPEN QUERY yet.