lock InnoDB table having AUTOCOMMIT=1
am 18.04.2005 11:01:47 von Annemarie MayerI'm using MySQL 4.1.7 and InnoDB tables. I'd like to lock some tables for
(write and) read of other users during a transaction, like this:
START TRANSACTION;
LOCK TABLES T1, T2;
....
....
UNLOCK TABLES T1, T2;
COMMIT;
Since I have AUTOCOMMIT=1, this does not work: "You should not have
AUTOCOMMIT = 1, because then InnoDB releases its table lock immediately
after the call of LOCK TABLES" (according to
http://dev.mysql.com/doc/mysql/en/lock-tables.html).
Do I have an alternative, having AUTOCOMMIT=1, to lock tables for read
access during a transaction? I considered SELECT * FROM table FOR UPDATE,
but this does not seem to perform a read lock.
Thank you for any suggestions,
Anne
--
+++ NEU: GMX DSL_Flatrate! Schon ab 14,99 EUR/Monat! +++
GMX Garantie: Surfen ohne Tempo-Limit! http://www.gmx.net/de/go/dsl
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org