Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transactions in wordpress database

Wordpress is using MyISAM storage engine. MyISAM does not support transactions.

How wordpress is maintaining transactions?

I mean if wordpress is having two database write operations, how does it ensure atomicity?

like image 655
Sabya Avatar asked Mar 31 '09 07:03

Sabya


People also ask

What are the examples of transactions in the database?

Any logical calculation done in a consistent mode in a database is known as a transaction. One example is a transfer from one bank account to another: the complete transaction requires subtracting the amount to be transferred from one account and adding that same amount to the other.

What are PHP transactions?

A transaction is a set of inter-dependent SQL statements that needs to execute in all-or-nothing mode. A transaction is successful if all SQL statements executed successfully. A failure of any statement will trigger the system to rollback to the original state to avoid data inconsistency.

What are transactions MySQL?

A transaction in MySQL is a sequential group of statements, queries, or operations such as select, insert, update or delete to perform as a one single work unit that can be committed or rolled back.

How can I see active transactions in MySQL?

You can use show innodb status (or show engine innodb status for newer versions of mysql) to get a list of all the actions currently pending inside the InnoDB engine. Buried in the wall of output will be the transactions, and what internal process ID they're running under.


1 Answers

Well, as far as I can tell, it doesn't! The only reason there are not much problems with this is, that most write operations are done with a single insert or update (adding a comment, creating a new post...).

In general, most web applications I have seen so far, don't bother too much with transactions, atomicity or even referential integrity, which is quite sad. On the one hand it is sad that so many applications just rely on pure luck that nothing bad happens and on the other hand it might lead to the impression that all these techniques aren't that important when it comes to database stuff.

like image 125
Simon Lehmann Avatar answered Oct 02 '22 02:10

Simon Lehmann