[wp-hackers] Implementing databse transaction in Wordpress
Peter Westwood
peter.westwood at ftwr.co.uk
Fri Oct 1 10:22:40 UTC 2010
Hi,
On 1 Oct 2010, at 06:09, Lox wrote:
> Today, I faced a problem with one of my customers. The table wp_usermeta had
> something wrong and I had to repair it (using SQL repair query)
>
> The side effect of that problem are many partial users records for the users
> that registered while the table was broken: those users had a record in
> wp_users table BUT NOT in wp_usermeta (as it was broken).
>
> This could have been easily avoided using database transactions. Is there
> any reason why this basic data integrity security layer hasn't been
> implemented in Wordpress?
Because in general they are not needed and they add extra overhead
Also transactions are not supported on all table types and you might want to use a different table type for performance reasons
You would do better looking in to what corrupted the table and how you could have detected that.
Transactions would have only helped you identify you had a problem sooner not fixed the problem!
--
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5
More information about the wp-hackers
mailing list