Hi! ----- Original Message ----- From: "Benjamin Pflugmann" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Sunday, December 08, 2002 3:14 AM Subject: Re: Record Lock?
> Hello. ... > With InnoDB you can lock a row by selecting it: > > SELECT * > FROM your_table > WHERE <some-condition-for-the-row-in-question> > FOR UPDATE > > will lock that row for you. Of course, only as long as you keept the > connection open. I would like to clarify that InnoDB holds locks till the current transaction COMMIT or ROLLBACK. Thus, in the AUTOCOMMIT=1 mode is makes no sense to use FOR UPDATE. When MySQL ends a connection, it rolls back the current transaction. Thus, locks are never kept after the connection ended. ... > HTH, > > Benjamin. Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB sql query --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php