Re: Problem with InnoDB locks
Miguel Angel Solorzano <[email protected]> Mon, 14 Mar 2005 17:35:00 -0300
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <6.2.0.14.0.20050314173330.04bd7408@localhost> |
At 13:54 14/3/2005, K.V.Suresh wrote: Dear Suresh, Could you please file a bug report at: http://bugs.mysql.com Thanks in advance. >Hi, > >I'm running MySQL 4.0.20 in Windows and face the >following problem with InnoDB. > >First create two tables >CREATE TABLE test ( > ID INTEGER NOT NULL, > name varchar(100) , > PRIMARY KEY (ID) >) TYPE=InnoDB > >create table test1 (ID INTEGER NOT NULL , ID1 INTEGER >NOT NULL, >PRIMARY KEY(ID,ID1), >FOREIGN KEY(ID) REFERENCES TEST(ID)) >type = InnoDB; > >insert into test values (1,'abc'); >insert into test values (2,'def'); > >insert into test1 values (1,1); >insert into test1 values (2,1); > >commit; > >now from one Transaction (say T1) do the following > >insert into test1 values(2,3); > >and another transaction (say T2): >update test set name='ghi' where ID=2; > >The T2 is waiting on lock! I don't really understand >this behavior. The two transaction are involving >different tables and the index column is not 'updated' >in T2, so why this lock? Can someone please throw some >light on this behavior? or is this a bug in the InnoDB >locking mechanism? > >Regards, >Suresh.K.V. > > >Send instant messages to your online friends http://uk.messenger.yahoo.com > >-- >MySQL Bugs Mailing List >For list archives: http://lists.mysql.com/bugs >To unsubscribe: http://lists.mysql.com/[email protected] Regards, Miguel Angel Solórzano <[email protected]> São Paulo - Brazil -- MySQL Bugs Mailing List For list archives: http://lists.mysql.com/bugs To unsubscribe: http://lists.mysql.com/[email protected]