* Erich Beyrent
[...]
> I am new to MySQL - do you *have* to commit the transaction after the
> insert?

Only if you are in an active transaction. MySQL supports multiple table
types, both transcational and non-transactional. BDB and InnoDB are the only
transcational table types in MySQL, and by default they are used with the
AUTOCOMMIT=1 setting.

> What is the benefit of the commit - does it do anything?

It makes the changes permanent, the alternative is ROLLBACK, which will undo
any changes done in the current transaction. These commands only have effect
if you actually use transactional tables, they are ignored if you use MyISAM
type tables, as there will never be a transaction to commit/rollback.

<URL: http://www.mysql.com/doc/en/COMMIT.html >
<URL: http://www.mysql.com/doc/en/ANSI_diff_Transactions.html >
<URL: http://www.mysql.com/doc/en/InnoDB_transaction_model.html >

--
Roger


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to