isc_tpb_read_committed

From InterBase
Jump to: navigation, search

Go Up to Specifying Isolation Level


A second isolation level, isc_tpb_read_committed, does not provide a consistent view of the database. Unlike a concurrency transaction, a read committed transaction sees changes made and committed by transactions that were active after this transaction started. Two other parameters, isc_tpb_rec_version, and isc_tpb_no_rec_version, should be used with the isc_tpb_read_committed parameter. They offer refined control over the committed changes a transaction is permitted to access:

  • isc_tpb_no_rec_version, the default refinement, specifies that a transaction can only read the latest version of a row. If a change to a row is pending, but not yet committed, the row cannot be read. Although default, this refinement may impose unnecessary wait conditions for your transaction. This option should be combined with isc_tpb_nowait to avoid deadlock messages.
  • isc_tpb_rec_version specifies that a transaction can read the latest committed version of a row, even if a more recent uncommitted version is pending.

The following declaration creates a TPB with a read committed isolation level, and specifies that the transaction can read the latest committed version of a row:

static char isc_tpb[] = {isc_tpb_version3, isc_tpb_write,
isc_tpb_read_committed, isc_tpb_rec_version};