On Sat, 23 Aug 2003, Heikki Tuuri wrote:

> 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:

Ahh, ok.  This is where I was confused.  Some of the wording of
the documentation made me think that transactions were not allowed
when you held a table lock, although I can't find anything specific
in the docs that would imply that looking at them now.  After
looking at it more closely, I am mistaken and transactions work as
normal when tables are locked, it is just that any open transaction
is automatically committed when you lock or unlock a table.

thanks for the clarification.

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

Reply via email to