An active transaction is a transaction that is started but is not committed or rolled back. All changes made by an active transaction are temporary before the transaction is committed. The changes are also not visible to other transactions. The state field in the virtual table named __all_virtual_trans_stat specifies the status of a transaction.
The following table describes the values of the state field.
| Value | Description |
|---|---|
| 0 | The transaction is in the active state and all its changes are not visible to other transactions. |
| 1 | The transaction starts to be committed and is in the PREPARE state. The read operations of the changes made by the transaction may get stuck, which depends on the transaction version. |
| 2 | The transaction starts to be committed and is in the COMMIT state. Changes made by the transaction may be visible to other transactions, which depends on the transaction version. |
| 3 | The transaction is rolled back and is in the ABORT state. Changes made by the transaction are not visible to other transactions. |
| 4 | The transaction is committed or rolled back and is in the CLEAR state. |
| 101 | The single-partition transaction is committed and is in the COMMIT state. Changes made by the transaction are visible to other transactions. |
| 102 | The single-partition transaction is rolled back. Changes made by the transaction are not visible to other transactions. |