Mikhail, I just tested this. You are probably using the query cache in 4.0. Then SELECT can return immediately without acquiring any locks.
Of course, it can be discussed if the query cache, too, should respect LOCK TABLES. I am forwarding this to Sanja. Thank you, Heikki ----- Original Message ----- From: ""Mikhail Entaltsev"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Thursday, July 24, 2003 3:44 PM Subject: InnoDB locking: Different behavior on 3.23.55 and 4.0.13 > ------=_NextPart_000_0119_01C351F2.03137C50 > Content-Type: text/plain; > charset="koi8-r" > Content-Transfer-Encoding: quoted-printable > > Hi > > I have 2 MySQL servers:=20 > Server1 is 3.23.55-max-log > Server2 is 4.0.13-standard-log > > Let's assume that we have 2 connections (Conn1 and Conn2) and table = > test: > ------------------------------------------------------------ > CREATE TABLE `test` ( > `id` int(3) NOT NULL auto_increment, > `name` char(10) default '', > PRIMARY KEY (`id`) > ) TYPE=3DInnoDB; > ------------------------------------------------------------ > and put some data in it: > ------------------------------------------------------------ > insert into test (id, name) values (1, 'cat'); > insert into test (id, name) values (2, 'dog'); > insert into test (id, name) values (3, 'bird'); > > ------------------------------------------------------------ > > I execute queries in the order: > > Conn1:=20 > LOCK TABLES test WRITE; > > then=20 > > Conn2: > select * from test; > > On the Server1 Conn2 is locked and it will be locked even more=20 > than innodb_lock_wait_timeout (that is not correct, right?). > But on the Server2 Conn2 returns results immediately. > > I guess that Server2 is wrong. What do you think? > > Thanks, > Mikhail. > ------=_NextPart_000_0119_01C351F2.03137C50-- > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]