| 1 |
create table t1( |
| 2 |
a int primary key |
| 3 |
) engine=ndbcluster; |
| 4 |
insert into t1 values |
| 5 |
(00),(01),(02),(03),(04),(05),(06),(07),(08),(09), |
| 6 |
(10),(11),(12),(13),(14),(15),(16),(17),(18),(19), |
| 7 |
(20),(21),(22),(23),(24),(25),(26),(27),(28),(29), |
| 8 |
(30),(31),(32),(33),(34),(35),(36),(37),(38),(39), |
| 9 |
(40),(41),(42),(43),(44),(45),(46),(47),(48),(49), |
| 10 |
(50),(51),(52),(53),(54),(55),(56),(57),(58),(59), |
| 11 |
(60),(61),(62),(63),(64),(65),(66),(67),(68),(69), |
| 12 |
(70),(71),(72),(73),(74),(75),(76),(77),(78),(79), |
| 13 |
(80),(81),(82),(83),(84),(85),(86),(87),(88),(89), |
| 14 |
(90),(91),(92),(93),(94),(95),(96),(97),(98),(99); |
| 15 |
|
| 16 |
# expected result 0 roundtrips - read stats from share |
| 17 |
explain select * from t1 where a < 100; |
| 18 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 19 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 20 |
Warnings: |
| 21 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 22 |
ndb_execute_count |
| 23 |
0 |
| 24 |
insert into t1 select a+100 from t1; |
| 25 |
|
| 26 |
# expected result 0 roundtrips - read stats from share |
| 27 |
explain select * from t1 where a < 100; |
| 28 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 29 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 20 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 30 |
Warnings: |
| 31 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 32 |
ndb_execute_count |
| 33 |
0 |
| 34 |
delete from t1 where a >= 100; |
| 35 |
|
| 36 |
# expected result 0 roundtrips - read stats from share |
| 37 |
explain select * from t1 where a < 100; |
| 38 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 39 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 40 |
Warnings: |
| 41 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 42 |
ndb_execute_count |
| 43 |
0 |
| 44 |
begin; |
| 45 |
insert into t1 select a+100 from t1; |
| 46 |
commit; |
| 47 |
|
| 48 |
# expected result 0 roundtrips - read stats from share |
| 49 |
explain select * from t1 where a < 100; |
| 50 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 51 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 20 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 52 |
Warnings: |
| 53 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 54 |
ndb_execute_count |
| 55 |
0 |
| 56 |
begin; |
| 57 |
delete from t1 where a >= 100; |
| 58 |
commit; |
| 59 |
|
| 60 |
# expected result 0 roundtrips - read stats from share |
| 61 |
explain select * from t1 where a < 100; |
| 62 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 63 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 64 |
Warnings: |
| 65 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 66 |
ndb_execute_count |
| 67 |
0 |
| 68 |
begin; |
| 69 |
insert into t1 select a+100 from t1; |
| 70 |
rollback; |
| 71 |
|
| 72 |
# expected result 0 roundtrips - read stats from share |
| 73 |
explain select * from t1 where a < 100; |
| 74 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 75 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 76 |
Warnings: |
| 77 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 78 |
ndb_execute_count |
| 79 |
0 |
| 80 |
begin; |
| 81 |
delete from t1 where a <= 100; |
| 82 |
rollback; |
| 83 |
|
| 84 |
# expected result 0 roundtrips - read stats from share |
| 85 |
explain select * from t1 where a < 100; |
| 86 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 87 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 88 |
Warnings: |
| 89 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 90 |
ndb_execute_count |
| 91 |
0 |
| 92 |
insert into t1 select a from t1; |
| 93 |
ERROR 23000: Can't write; duplicate key in table 't1' |
| 94 |
|
| 95 |
# expected result 0 roundtrips - read stats from share |
| 96 |
explain select * from t1 where a < 100; |
| 97 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 98 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 99 |
Warnings: |
| 100 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 101 |
ndb_execute_count |
| 102 |
0 |
| 103 |
begin; |
| 104 |
insert into t1 select a from t1; |
| 105 |
ERROR 23000: Can't write; duplicate key in table 't1' |
| 106 |
|
| 107 |
# expected result 0 roundtrips - read stats from share |
| 108 |
explain select * from t1 where a < 100; |
| 109 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
| 110 |
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 100.00 Using where with pushed condition (`test`.`t1`.`a` < 100); Using MRR |
| 111 |
Warnings: |
| 112 |
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` < 100) |
| 113 |
ndb_execute_count |
| 114 |
0 |
| 115 |
drop table t1; |