Does tokudb not need gap lock in repeatable-read isolation for non-unique index?

24 views
Skip to first unread message

郭枫

unread,
Sep 8, 2015, 6:08:32 AM9/8/15
to tokudb-user
InnoDB will use row and gap lock  in  repeatable-read isolation for non-unique index,and I did a experiment, it seems tokudb doesn't need gap lock,just row lock;But this article says tokudb use range lock, so I wonder tokudb's lock merchanism.Below is my experiment:
Session 1:
>set tx_isolation = 'repeatable-read';
>create table t(id int,key idx(id));
>insert into t values (17,20,33,39,42,43);
>begin;
>delete from t where id =33;
If tokudb use gap or range lock then [20.39) will be locked,but in session 2 , I didn't see any lock:
Session 2:
>set tx_isolation = 'repeatable-read';
>begin;
> insert into t values(24);  
Query OK, 1 row affected (0.00 sec)


Reply all
Reply to author
Forward
0 new messages