lrt_tpsuspend

Transaction Handling Functions

Suspends a global transaction.

int lrt_tpsuspend( TPTRANID *tranid, long flags );

tranid Global transaction id.
flags Reserved for future use and should be set to 0.

The lrt_tpsuspend function suspends a global transaction. It is used in conjunction with the lrt_tpresume statement.

Return Values

If the function fails, it returns -1 and sets tperrno to indicate the error condition.

Parameterization

You cannot use standard parameterization for any arguments in this function.

Example

In the following example, lrt_tpsuspend suspends the global transaction with the id tranid.

Copy code
TPTRANID tranid;
lrt_tpbegin(30, 0);
lrt_tpsuspend(&tranid, 0);
lrt_tpresume(&tranid, 0);
lrt_tpcommit(0);