Commit a161c19b authored by Sergey Petrunya's avatar Sergey Petrunya

Fix test results to deal with rounding error in #rows in EXPLAIN output.

parent 5eecea8c
...@@ -343,6 +343,7 @@ alter table t1 add index i3(key3); ...@@ -343,6 +343,7 @@ alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1; update t1 set key2=key1,key3=key1;
# to test the bug, the following must use "sort_union": # to test the bug, the following must use "sort_union":
--replace_column 9 ROWS
explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
drop table t1; drop table t1;
......
...@@ -313,7 +313,7 @@ alter table t1 add index i3(key3); ...@@ -313,7 +313,7 @@ alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1; update t1 set key2=key1,key3=key1;
explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL 8 Using sort_union(i3,i2); Using where 1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL ROWS Using sort_union(i3,i2); Using where
select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
key1 key2 key3 key1 key2 key3
31 31 31 31 31 31
......
...@@ -1146,7 +1146,7 @@ alter table t1 add index i3(key3); ...@@ -1146,7 +1146,7 @@ alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1; update t1 set key2=key1,key3=key1;
explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL 11 Using sort_union(i3,i2); Using where 1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL ROWS Using sort_union(i3,i2); Using where
select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
key1 key2 key3 key1 key2 key3
31 31 31 31 31 31
......
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