| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Peter Brawley | Date: | August 31 2011 2:10am |
| Subject: | locked non-existent row | ||
| View as plain text | |||
While a transaction in one thread tries to update a non-existent InnoDB
row with a given key value, an attempt to insert that value in another
thread is locked out. Does anyone know where this behaviour is documented?
-- connection 1
drop table if exists t;
create table t( lockid char(3), lockinfo char(8), primary
key(lockid,lockinfo) );
insert into t values('abc','def');
begin work;
update t set lockinfo='bar' where lockid='foo';
-- connection 2:
insert into t values('aaa','bbb');
Query OK, 1 row affected (0.00 sec)
insert into t values('foo','bar'); -- waits for connection 1 transaction
PB
| Thread | ||
|---|---|---|
| • locked non-existent row | Peter Brawley | 31 Aug |
| • Re: locked non-existent row | Rik Wasmus | 31 Aug |
| • Re: locked non-existent row | Peter Brawley | 31 Aug |
| • Re: locked non-existent row | Rik Wasmus | GRIB | 1 Sep |
| • RE: locked non-existent row | Jerry Schwartz | 1 Sep |
| • Re: locked non-existent row | Rik Wasmus | 1 Sep |
| • Re: locked non-existent row | Peter Brawley | 1 Sep |
| • RE: locked non-existent row | Jerry Schwartz | 1 Sep |
| • Re: locked non-existent row | Peter Brawley | 2 Sep |
| • Re: locked non-existent row | Jochem van Dieten | 2 Sep |
| • Re: locked non-existent row | Peter Brawley | 2 Sep |
