Subject Transaction Parameter Block Options
Hi dear ladies and guys,

I'm writing an article about Firebird Transactions (in French...) and I would like to know if you can help me to explain what are these parameters for Transaction Parameter Block, many are not documented in Interbase 6.0 Documentation Set :

#define isc_tpb_version1 1

TPB version 1

#define isc_tpb_version3 3

TPB version 3

#define isc_tpb_consistency 1

Lock-based transaction scheme. Useful for SERIALIZABLE isolation level in conjuction with isc_tpb_lock_read / isc_tpb_lock_write and isc_tpb_exclusive ?

#define isc_tpb_concurrency 2

MGA based transaction scheme. Used for REPEATABLE READ isolation level

#define isc_tpb_shared 3

Shared table reservation mode for lock based transaction scheme.

#define isc_tpb_protected 4

Protected table reservation mode for lock based transaction scheme.

#define isc_tpb_exclusive 5

??? (not documented) : Exclusive table reservation mode for lock based transaction scheme. I think I have to use it to simulate SERIALIZABLE isolation level.

#define isc_tpb_wait 6

Indicated wheter the transaction should wait for others pending transactions to commit before accessing the records.

#define isc_tpb_nowait 7

Indicate the transaction to raise an exception immediately if pending transactions are accessing the same records.

#define isc_tpb_read 8

The transaction is read only

#define isc_tpb_write 9

The transaction has read/write access rights.

#define isc_tpb_lock_read 10

Specifies which tables are locked for non concurrent reads (other than isc_tpc_read_commited and isc_tpb_concurrency)

#define isc_tpb_lock_write 11

Specifies which tables are locked for non concurrent writes (see isc_tpb_lock_read)

#define isc_tpb_verb_time 12

??? not documented.

#define isc_tpb_commit_time 13

??? not documented ? is this for snapshot isolation level ?

#define isc_tpb_ignore_limbo 14

??? used by gbak to ignore limbos ?

#define isc_tpb_read_committed 15

READ COMMITED isolation level.

#define isc_tpb_autocommit 16

??? not documented

#define isc_tpb_rec_version 17

A transaction can always read the last commited version of a record even if there are pending transactions that have modified this record.

#define isc_tpb_no_rec_version 18

A transaction has to wait (or report an error if no_wait specified) for all other pending transactions to commit before reading the latest version of this record.

#define isc_tpb_restart_requests 19

??? not documented

#define isc_tpb_no_auto_undo 20

??? not documented

#define isc_tpb_lock_timeout 21

??? as in Interbase 7 ? raises an error if a transaction was locked too much time ?

As a bonus, can you help me defining wich parameters should be used to simulate all standard and non standard SQL isolations levels ?

READ UNCOMMITED : not allowed by Firebird
READ COMMITED : isc_tpc_read_commited, isc_tpb_rec_version, isc_tpb_no_wait
CURSOR STABILITY : ??? i believe it should use isc_tpb_read_commited + something ?
REPEATABLE READ : isc_tpb_concurrency
SERIALIZABLE : isc_tpb_consistency, isc_tpb_wait, isc_tpb_lock_write (all tables), isc_tpb_exclusive

Many thanks in advance,

Best regards,

Pierre Y.