Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Avoiding any locks in SQL Servers - read and understand....its magic.
Heikki,
"Heikki Tuuri" <Heikki.Tuuri_at_innodb.com> wrote in message
news:PLoVb.128$is1.7_at_read3.inet.fi...
> VC,
>
OK, I see what you are doing. However, the schedule below will still be serial:
use test;
drop table t;
create table t(id int, x int) type=innodb;
insert into t values(1,50);
insert into t values(2,100);
commit;
T1:
use test;
set transaction isolation level serializable;
set autocommit=0;
update t set x=-1 where id=1;
T2:
use test;
set transaction isolation level serializable;
set autocommit=0;
update t set x=-1 where id=2;
.. in the absence of the unique index on id the whole table will be locked. So we can say that InnoDB does implement some kind of the SERIALIZABLE IL with the following properties:
Looks quite similat to MS SQL Server's Serializable(although I am not sure about page level locks for InnoDB).
Rgds.
VC
>
> 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 InnoDB which also backs up
MyISAM
> tables
>
>
Received on Sun Feb 08 2004 - 09:53:18 CST