Skip to content

Commit ec8d307

Browse files
lthfacebook-github-bot
authored andcommitted
Stabilize rocksdb.rocksdb_mrr
Summary: As titled. Reviewed By: luqun Differential Revision: D37044391 fbshipit-source-id: 3996d39075bd7f9d3589b8b88a7373ce09cb706d
1 parent 81baa6c commit ec8d307

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

mysql-test/suite/rocksdb/r/rocksdb_mrr.result

+8-8
Original file line numberDiff line numberDiff line change
@@ -538,14 +538,14 @@ drop table t20;
538538
#
539539
explain select t3.col1 from t3 where t3.col1=20 or t3.col1 between 25 and 28;
540540
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
541-
1 SIMPLE t3 NULL range col1 col1 5 NULL 2 100.00 Using where; Using index
541+
1 SIMPLE t3 NULL range col1 col1 5 NULL # # Using where; Using index
542542
Warnings:
543543
Note 1003 /* select#1 */ select `test`.`t3`.`col1` AS `col1` from `test`.`t3` where ((`test`.`t3`.`col1` = 20) or (`test`.`t3`.`col1` between 25 and 28))
544544
# This will use MRR:
545545
explain
546546
select * from t3 where t3.col1=20 or t3.col1 between 25 and 28;
547547
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
548-
1 SIMPLE t3 NULL range col1 col1 5 NULL 2 100.00 Using index condition; Using MRR
548+
1 SIMPLE t3 NULL range col1 col1 5 NULL # # Using index condition; Using MRR
549549
Warnings:
550550
Note 1003 /* select#1 */ select `test`.`t3`.`pk1` AS `pk1`,`test`.`t3`.`pk2` AS `pk2`,`test`.`t3`.`col1` AS `col1`,`test`.`t3`.`filler` AS `filler` from `test`.`t3` where ((`test`.`t3`.`col1` = 20) or (`test`.`t3`.`col1` between 25 and 28))
551551
select * from t3 where t3.col1=20 or t3.col1 between 25 and 28;
@@ -559,7 +559,7 @@ pk1 pk2 col1 filler
559559
explain
560560
select * from t3 where (t3.col1=20 or t3.col1 between 25 and 28) and mod(t3.col1,2)=0;
561561
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
562-
1 SIMPLE t3 NULL range col1 col1 5 NULL 2 100.00 Using index condition; Using MRR
562+
1 SIMPLE t3 NULL range col1 col1 5 NULL # # Using index condition; Using MRR
563563
Warnings:
564564
Note 1003 /* select#1 */ select `test`.`t3`.`pk1` AS `pk1`,`test`.`t3`.`pk2` AS `pk2`,`test`.`t3`.`col1` AS `col1`,`test`.`t3`.`filler` AS `filler` from `test`.`t3` where (((`test`.`t3`.`col1` = 20) or (`test`.`t3`.`col1` between 25 and 28)) and ((`test`.`t3`.`col1` % 2) = 0))
565565
select * from t3 where (t3.col1=20 or t3.col1 between 25 and 28) and mod(t3.col1,2)=0;
@@ -576,7 +576,7 @@ explain
576576
select pk1,pk2,col1, filler,mod(t3.col1,2) from t3
577577
where (t3.col1=20 or t3.col1 between 25 and 28) and mod(t3.col1,2)=0;
578578
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
579-
1 SIMPLE t3 NULL range col1 col1 5 NULL 2 100.00 Using index condition; Using MRR
579+
1 SIMPLE t3 NULL range col1 col1 5 NULL # # Using index condition; Using MRR
580580
Warnings:
581581
Note 1003 /* select#1 */ select `test`.`t3`.`pk1` AS `pk1`,`test`.`t3`.`pk2` AS `pk2`,`test`.`t3`.`col1` AS `col1`,`test`.`t3`.`filler` AS `filler`,(`test`.`t3`.`col1` % 2) AS `mod(t3.col1,2)` from `test`.`t3` where (((`test`.`t3`.`col1` = 20) or (`test`.`t3`.`col1` between 25 and 28)) and ((`test`.`t3`.`col1` % 2) = 0))
582582
select pk1,pk2,col1, filler,mod(t3.col1,2) from t3
@@ -594,8 +594,8 @@ pk1 pk2 col1 filler mod(t3.col1,2)
594594
explain
595595
select * from t0,t3 where t3.col1=t0.a and mod(t3.pk2,2)=t0.a;
596596
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
597-
1 SIMPLE t0 NULL ALL NULL NULL NULL NULL 10 100.00 Using where
598-
1 SIMPLE t3 NULL ref col1 col1 5 test.t0.a 11 100.00 Using index condition; Using join buffer (Batched Key Access)
597+
1 SIMPLE t0 NULL ALL NULL NULL NULL NULL # # Using where
598+
1 SIMPLE t3 NULL ref col1 col1 5 test.t0.a # # Using index condition; Using join buffer (Batched Key Access)
599599
Warnings:
600600
Note 1003 /* select#1 */ select `test`.`t0`.`a` AS `a`,`test`.`t3`.`pk1` AS `pk1`,`test`.`t3`.`pk2` AS `pk2`,`test`.`t3`.`col1` AS `col1`,`test`.`t3`.`filler` AS `filler` from `test`.`t0` join `test`.`t3` where ((`test`.`t3`.`col1` = `test`.`t0`.`a`) and ((`test`.`t3`.`pk2` % 2) = `test`.`t0`.`a`))
601601
select * from t0,t3 where t3.col1=t0.a and mod(t3.pk2,2)=t0.a;
@@ -630,8 +630,8 @@ a pk1 pk2 col1 filler
630630
explain
631631
select * from t0 left join t4 using (a) where t4.a is null;
632632
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
633-
1 SIMPLE t0 NULL ALL NULL NULL NULL NULL 10 # NULL
634-
1 SIMPLE t4 NULL eq_ref PRIMARY PRIMARY 4 test.t0.a 1 # Using where; Not exists; Using index; Using join buffer (Batched Key Access)
633+
1 SIMPLE t0 NULL ALL NULL NULL NULL NULL # # NULL
634+
1 SIMPLE t4 NULL eq_ref PRIMARY PRIMARY 4 test.t0.a # # Using where; Not exists; Using index; Using join buffer (Batched Key Access)
635635
Warnings:
636636
Note 1003 /* select#1 */ select `test`.`t0`.`a` AS `a` from `test`.`t0` left join `test`.`t4` on((`test`.`t4`.`a` = `test`.`t0`.`a`)) where (`test`.`t4`.`a` is null)
637637
select * from t0 left join t4 using (a) where t4.a is null;

mysql-test/suite/rocksdb/t/rocksdb_mrr.test

+6-1
Original file line numberDiff line numberDiff line change
@@ -258,20 +258,24 @@ drop table t20;
258258
--echo #
259259
--echo # Check how MRR works without BKA
260260
--echo #
261+
--replace_column 10 # 11 #
261262
explain select t3.col1 from t3 where t3.col1=20 or t3.col1 between 25 and 28;
262263

263264
--echo # This will use MRR:
265+
--replace_column 10 # 11 #
264266
explain
265267
select * from t3 where t3.col1=20 or t3.col1 between 25 and 28;
266268
select * from t3 where t3.col1=20 or t3.col1 between 25 and 28;
267269

268270
--echo # Check if Index Condition Pushdown works
271+
--replace_column 10 # 11 #
269272
explain
270273
select * from t3 where (t3.col1=20 or t3.col1 between 25 and 28) and mod(t3.col1,2)=0;
271274
select * from t3 where (t3.col1=20 or t3.col1 between 25 and 28) and mod(t3.col1,2)=0;
272275

273276
select * from t3 use index() where (t3.col1=20 or t3.col1 between 25 and 28) and mod(t3.col1,2)=0;
274277

278+
--replace_column 10 # 11 #
275279
explain
276280
select pk1,pk2,col1, filler,mod(t3.col1,2) from t3
277281
where (t3.col1=20 or t3.col1 between 25 and 28) and mod(t3.col1,2)=0;
@@ -286,6 +290,7 @@ where (t3.col1=20 or t3.col1 between 25 and 28) and mod(t3.col1,2)=0;
286290
--echo # "current row" for the preceding table(s)
287291
--echo #
288292

293+
--replace_column 10 # 11 #
289294
explain
290295
select * from t0,t3 where t3.col1=t0.a and mod(t3.pk2,2)=t0.a;
291296
select * from t0,t3 where t3.col1=t0.a and mod(t3.pk2,2)=t0.a;
@@ -308,7 +313,7 @@ explain
308313
select * from t0 left join t3 on t3.col1=t0.a where t3.pk1 is null;
309314
select * from t0 left join t3 on t3.col1=t0.a where t3.pk1 is null;
310315

311-
--replace_column 11 #
316+
--replace_column 10 # 11 #
312317
explain
313318
select * from t0 left join t4 using (a) where t4.a is null;
314319
select * from t0 left join t4 using (a) where t4.a is null;

0 commit comments

Comments
 (0)