Sets the blocking lock strategy for FairCom DB SQL queries.
Description
By default, SQL connections block on locks. Situations can arise with mixing SQL operations with existing non-SQL applications. An application may acquire a non-blocking lock, and hold that lock for a length of time, thereby blocking an SQL query which might be expected to return sooner. An "abandoned" lock might indefinitely block the query. To avoid these situation, options are available to change the blocking lock behavior for SQL connections.
Parameters (mode)
mode SMALLINT
Set mode = 1 to enable blocking locks; set mode = 0 to disable blocking locks
A negative mode value enables a blocking lock with a defined timeout value (in seconds) from the absolute value of the parameter.
For example, a value of -2 with a SELECT query times out if it waits on an existing lock for more than 2 seconds.
The scope of the locking behavior is only within the current user session (that is, the current executing SQL thread); it is not global across other connections. Each SQL thread of operation can specify it's own unique locking behavior.
Examples
call fc_set_blockinglock( 0 );
call fc_set_blockinglock( 1 );
call fc_set_blockinglock( -2 );