$session->transactionStart( $lock_code )

The transactionStart() function starts a transaction block, which may subsequently be stopped or committed by using transactionAbort()/transactionCommit().

 sub SM_READ_LOCK { 1 };

$session->transactionStart( SM_READ_LOCK );

The $lock_code values have the possible values shown in Lock code literals.

Table 1. Lock code literals

Lock code

Literal

0

SM_NO_LOCK

1

SM_READ_LOCK_ONLY

2

SM_READ_LOCK

3

SM_WRITE_LOCK