About Transactions

In this section:

By default, Hyperstage uses AUTOCOMMIT mode to finalize transactions, meaning that every transaction is either automatically committed or rolled back if an error occurs. However, you can and should choose to disable AUTOCOMMIT and use COMMIT and ROLLBACK commands instead.


Top of page

x
Using AUTOCOMMIT, COMMIT, and ROLLBACK Commands

A new transaction starts with the first LOAD command or DML statement entered in a new Hyperstage session. A new transaction also starts after each COMMIT or ROLLBACK command.

You can disable AUTOCOMMIT by setting the parameter to 0 (zero) and enable AUTOCOMMIT by setting the parameter to 1. If AUTOCOMMIT is set to 1, then when a LOAD is completed, the transaction is automatically committed.

Using COMMIT and ROLLBACK makes it possible to check the load within the same session before committing the data, as the loaded data is available (viewable) to the load session. For instance, you could check something about the data (number of records load) before committing.

After importing data using the LOAD DATA INFILE command, the status of the import and the number of affected rows is shown. All uncommitted rows, including those from previous imports, are shown. Therefore, the number of affected rows may be greater than the number of rows in the file you just imported.


Top of page

x
About Transaction Behavior

While a write operation is being performed on a table, the following occurs:

While a read query is being executed on a table, the following occurs:

In general, Hyperstage uses table level locking where only one write operation (INSERT, UPDATE, DELETE, or LOAD) can execute at one time.


Top of page

x
Failure Handling

If AUTOCOMMIT is disabled and the Hyperstage server is terminated during an import session, the following occurs:

If AUTOCOMMIT is disabled and the Hyperstage server is terminated after an import session is completed successfully but is not committed, the following occurs:

If the Hyperstage server is terminated during an export operation to a disk file, the following occurs:

If Hyperstage tries to import data from a file created during a failed export session, the following occurs:


WebFOCUS