in reply to Re: OT: help with MySQL questions
in thread OT: help with MySQL questions

Setting auto commit to one means that every modification is a separate transaction. Which means that if you have a relation between two tables, and you need to make an update/insert/delete in both tables, and you have auto commit on, you will be living dangerously, as your relations aren't modified atomically.

Newer versions of MySQL support transactions, but only if you use a specific kind of table. For a long time, the MySQL documentation said you had to code transaction support in your user code yourself.

Note that locking tables itself doesn't give you full transaction support - it just prevents someone else from modifying the table as well. You won't get rollbacks, and if you have to modify more than one table, you might get deadlocked, as someone else may lock the tables in the reverse order. Not to mention the potential performance hit if for every insert you need to lock the entire table.

Abigail