Truncate Table errors

From InterBase

Go Up to Truncate Table

A lock error returns if an exclusive table lock cannot be acquired during the locking phase. The error returned can be a isc_deadlock error or a transaction wait error depending on the transaction's wait mode. If a transaction waits indefinitely for lock acquisition, it can only return a isc_deadlock error due to a real deadlock with a concurrent transaction.

If the transaction is NO WAIT, it returns an isc_lock_conflict error immediately. If the transaction requests a WAIT TIME, it returns isc_lock_timeout when waiting the specified time for table lock acquisition.

It is also an error to execute a Truncate Table command from a READ_ONLY transaction or database. During the truncation phase there is no expected way for an error to occur. However, unexpected errors can occur due to extraneous circumstances.

If a transaction executing a Truncate Table command has open cursors on one or more of the truncated tables, attempting to perform an UPDATE on those open cursors can return an isc_table_truncated. Otherwise, if the fetch from the cursor is only for retrieval purposes, the fetch operation returns as if there were no more remaining rows to fetch.

Advance To: