1887.3.2
by Brian Aker
Extended documentation. |
1 |
Using transactions
|
1900.2.7
by Stewart Smith
fix docs warning: underline/overline too short for transactional.rst |
2 |
==================
|
1887.3.2
by Brian Aker
Extended documentation. |
3 |
|
4 |
.. toctree:: |
|
5 |
:maxdepth: 2
|
|
6 |
||
7 |
start_transaction |
|
8 |
commit |
|
9 |
rollback |
|
10 |
savepoints |
|
11 |
||
1994.4.3
by Marisa Plumb
few updates and modifications to admin commands |
12 |
The essence of a transaction is that it groups multiple steps into a single, all-or-nothing operation. Drizzle is a transactional database by default and by design, meaning that changes and queries to the database appear to be Atomic, Consistent, Isolated, and Durable (ACID). This means that Drizzle implements `serializable <http://en.wikipedia.org/wiki/Serializability>`_, ACID transactions, even if the transaction is interrupted. |
1994.4.2
by Marisa Plumb
modified transaction docs |
13 |
|
14 |
It collects operations that form tasks and stores them as a single operation, or if that operation is not possible it removes all changes attempted. Transactions are controlled via START TRANSACTION, ROLLBACK, and COMMIT. Savepoints are implemented to allow for a low leverl of granulairty. |
|
1887.3.2
by Brian Aker
Extended documentation. |
15 |
|
16 |
A COMMIT statement ends a transaction within Drizzle and makes all changes visible to other users. The order of events is typically to issue a START TRANSACTION statement, execute one or more SQL statements, and then issue a COMMIT statement. Alternatively, a ROLLBACK statement can be issued, which undoes all the work performed since START TRANSACTION was issued. A COMMIT statement will also release any existing savepoints that may be in use. |
|
17 |
||
1994.4.2
by Marisa Plumb
modified transaction docs |
18 |
Drizzle can operate in an autocommit mode, where each statement is committed, via: ::
|
1887.3.2
by Brian Aker
Extended documentation. |
19 |
|
1994.4.2
by Marisa Plumb
modified transaction docs |
20 |
SET AUTOCOMMIT= 1
|
1887.3.2
by Brian Aker
Extended documentation. |
21 |
|
22 |
Currently DDL operations are performed as a single transaction, this limitation will be lifted in the future. |
|
23 |
||
24 |