Chris,
please send your messages to [EMAIL PROTECTED] The newsgroup
mailing.database.mysql is only a mirror.
----- Original Message -----
From: "Chris" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Tuesday, September 02, 2003 9:31 PM
Subject: lock in share mode/rollback question
> If I issue something like this for an innodb table, if the select
> returns no rows, do I need to roll back? I.e., is a rollback required
> to release any resources, even though no rows were locked?
>
> begin;
> select * from test where primary_key_column = 1 lock in share mode;
> ...
COMMIT and ROLLBACK release all InnoDB locks of a transaction. They do not
release MySQL's manual table level locks, which you set with the statement
LOCK TABLES ... {READ | WRITE}.
> Thanks,
> Chris
Best regards,
Heikki Tuuri
Innobase Oy
http://www.innodb.com
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - 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]