Marc, ----- Original Message ----- From: "Marc Slemko" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Saturday, August 23, 2003 7:19 AM Subject: innodb use outside of explicit transactions
> Suppose I have an innodb table in 4.0.14 and do: > > LOCK TABLE maggie > INSERT INTO maggie values(123, 'simpson'); > UNLOCK TABLES > > As soon as I issue LOCK TABLE, any transaction in progress is > automatically committed. > > By what point is this INSERT guaranteed to be committed to disk > (ie. redo log)? > > Is it: > > 1. before INSERT returns? because you have AUTOCOMMIT=1, the transaction is committed in MySQL-4.0.14 before the INSERT returns. There was a bug/'feature' and this was only fixed in 4.0.14: " MySQL/InnoDB-4.0.14, July 21, 2003 ... Fixed a bug: if AUTOCOMMIT=1 then inside LOCK TABLES MySQL failed to do the commit after an updating SQL statement if binlogging was not on, and for SELECTS did not commit regardless of the binlogging state. " > 2. before UNLOCK TABLES returns? > > 3. before it is read by any separate transaction? > > 4. before any separate transaction that read this data is committed? > > 5. sometime, no guarantee? This would seem to violate transactional > integrity of the new transaction if it had a foreign key reference. Best regards, Heikki Tuuri Innobase Oy http://www.innodb.com Transactions, foreign keys, and a hot backup tool for MySQL -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]