Commit 9346a30c authored by John Esmet's avatar John Esmet

[t:3981] fixed test


git-svn-id: file:///svn/mysql/tests/mysql-test@37470 c7de825b-a66e-492c-adef-691d508d4ae1
parent 780c0433
......@@ -7,7 +7,8 @@ drop table if exists t;
connect(conn1, localhost, root);
connection default;
set global tokudb_lock_timeout=200;
# set global tokudb_lock_timeout=200;
# Basic key
create table t (a int primary key, b int) engine=tokudb;
insert into t values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
......@@ -70,61 +71,160 @@ drop table t;
# Double key
create table t (a int, b int, primary key (a,b)) engine=tokudb;
insert into t values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
insert into t values (1, 1);
insert into t values (2, 2);
insert into t values (3, 3);
insert into t values (4, 4);
insert into t values (5, 5);
insert into t values (6, 6);
insert into t values (7, 7);
insert into t values (8, 8);
insert into t values (9, 9);
insert into t values (10, 10);
insert into t values (11, 11);
insert into t values (12, 12);
insert into t values (13, 13);
insert into t values (14, 14);
insert into t values (15, 15);
insert into t values (16, 16);
insert into t values (17, 17);
insert into t values (18, 18);
insert into t values (19, 19);
insert into t values (20, 20);
insert into t values (21, 21);
insert into t values (22, 22);
insert into t values (23, 23);
insert into t values (24, 24);
insert into t values (25, 25);
insert into t values (26, 26);
insert into t values (27, 27);
insert into t values (28, 28);
insert into t values (29, 29);
insert into t values (30, 30);
insert into t values (31, 31);
insert into t values (32, 32);
insert into t values (33, 33);
insert into t values (34, 34);
insert into t values (35, 35);
insert into t values (36, 36);
insert into t values (37, 37);
insert into t values (38, 38);
insert into t values (39, 39);
insert into t values (40, 40);
insert into t values (41, 41);
insert into t values (42, 42);
insert into t values (43, 43);
insert into t values (44, 44);
insert into t values (45, 45);
insert into t values (46, 46);
insert into t values (47, 47);
insert into t values (48, 48);
insert into t values (49, 49);
insert into t values (50, 50);
insert into t values (51, 51);
insert into t values (52, 52);
insert into t values (53, 53);
insert into t values (54, 54);
insert into t values (55, 55);
insert into t values (56, 56);
insert into t values (57, 57);
insert into t values (58, 58);
insert into t values (59, 59);
insert into t values (60, 60);
insert into t values (61, 61);
insert into t values (62, 62);
insert into t values (63, 63);
insert into t values (64, 64);
insert into t values (65, 65);
insert into t values (66, 66);
insert into t values (67, 67);
insert into t values (68, 68);
insert into t values (69, 69);
insert into t values (70, 70);
insert into t values (71, 71);
insert into t values (72, 72);
insert into t values (73, 73);
insert into t values (74, 74);
insert into t values (75, 75);
insert into t values (76, 76);
insert into t values (77, 77);
insert into t values (78, 78);
insert into t values (79, 79);
insert into t values (80, 80);
insert into t values (81, 81);
insert into t values (82, 82);
insert into t values (83, 83);
insert into t values (84, 84);
insert into t values (85, 85);
insert into t values (86, 86);
insert into t values (87, 87);
insert into t values (88, 88);
insert into t values (89, 89);
insert into t values (90, 90);
insert into t values (91, 91);
insert into t values (92, 92);
insert into t values (93, 93);
insert into t values (94, 94);
insert into t values (95, 95);
insert into t values (96, 96);
insert into t values (97, 97);
insert into t values (98, 98);
insert into t values (99, 99);
insert into t values (100, 100);
begin;
select * from t where a < 3 for update;
select * from t where a < 30 for update;
connection conn1;
select * from t where a >= 3 for update;
select * from t where a = 3 for update;
select * from t where a >= 30 for update;
select * from t where a = 30 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a < 3 for update;
select * from t where a < 30 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a <= 3 for update;
select * from t where a <= 30 for update;
connection default;
commit;
begin;
select * from t where a > 3 for update;
select * from t where a > 30 for update;
connection conn1;
select * from t where a <= 3 for update;
select * from t where a = 3 for update;
select * from t where a <= 30 for update;
select * from t where a = 30 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a > 3 for update;
select * from t where a > 30 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a >= 3 for update;
select * from t where a >= 30 for update;
connection default;
commit;
begin;
select * from t where a = 5 for update;
select * from t where a = 50 for update;
connection conn1;
select * from t where a > 5 for update;
select * from t where a < 5 for update;
select * from t where a > 50 for update;
select * from t where a < 50 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a = 5 for update;
select * from t where a = 50 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a >= 5 for update;
select * from t where a >= 50 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a <= 5 for update;
select * from t where a <= 50 for update;
connection default;
ommit;
commit;
begin;
select * from t where a > 2 and a < 5 for update;
select * from t where a > 20 and a < 50 for update;
connection conn1;
select * from t where a = 2 for update;
select * from t where a <= 2 for update;
select * from t where a = 5 for update;
select * from t where a >= 5 for update;
select * from t where a = 20 for update;
select * from t where a <= 20 for update;
select * from t where a = 50 for update;
select * from t where a >= 50 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a <= 5 for update;
select * from t where a <= 50 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a < 5 for update;
select * from t where a < 50 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a >= 2 for update;
select * from t where a >= 20 for update;
--error ER_LOCK_WAIT_TIMEOUT
select * from t where a > 2 for update;
select * from t where a > 20 for update;
connection default;
commit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment