Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Atomic Operations

Status
Not open for further replies.

BNPMike

Technical User
Sep 17, 2001
1,818
GB
The MySQL Manual has this in the section on transactions

"The other non-transactional table types (such as MyISAM) in MySQL Server follow a different paradigm for data integrity called ``Atomic Operations.'' Atomic operations often offer comparable integrity with higher performance. "

Does anyone know what this means?

Usually an atomic operation is one bounded by a start...commit. A typical sensitive example would be moving $1million from account A to account b. You want to make sure account B is successfully completed before you commit to account A being deducted.

MySQL seem to be saying that most transaction rollbacks are caused by deadlocks so if you lock your tables you're ok - everything is bound to go through. This clearly ignores many other types of failure.

Or perhaps they are saying if you break you logic into single SQL statements and then surround them by checking code (ie use a defensive programming style) you will at least capture faults which then can be corrected manually.

Neither of these is very convincing. If they said mostly you don't really need unit-of-work transaction control, I'd see their point but I can't see how you can be transaction safe without transactions.

What do you think a MySQL atomic operation is?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top