mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-bug-11044
This commit is contained in:
@ -1954,6 +1954,24 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
explain select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 128 Using where; Using index
|
||||
explain select a1 from t1 where a2 = 'b' group by a1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using where; Using index for group-by
|
||||
select a1 from t1 where a2 = 'b' group by a1;
|
||||
a1
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
explain select distinct a1 from t1 where a2 = 'b';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using where; Using index for group-by
|
||||
select distinct a1 from t1 where a2 = 'b';
|
||||
a1
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
@ -482,7 +482,6 @@ select a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
|
||||
select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
|
||||
select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
|
||||
|
||||
|
||||
--
|
||||
-- DISTINCT queries
|
||||
--
|
||||
@ -526,6 +525,7 @@ select distinct a1,a1 from t1;
|
||||
select distinct a2,a1,a2,a1 from t1;
|
||||
select distinct t1.a1,t2.a1 from t1,t2;
|
||||
|
||||
|
||||
--
|
||||
-- DISTINCT queries with GROUP-BY
|
||||
--
|
||||
@ -641,6 +641,17 @@ explain select a1,a2,count(a2) from t1 group by a1,a2,b;
|
||||
explain select a1,a2,count(a2) from t1 where (a1 > 'a') group by a1,a2,b;
|
||||
explain select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b;
|
||||
|
||||
#
|
||||
# BUG#11044: DISTINCT or GROUP BY queries with equality predicates instead of MIN/MAX.
|
||||
#
|
||||
|
||||
explain select a1 from t1 where a2 = 'b' group by a1;
|
||||
select a1 from t1 where a2 = 'b' group by a1;
|
||||
|
||||
explain select distinct a1 from t1 where a2 = 'b';
|
||||
select distinct a1 from t1 where a2 = 'b';
|
||||
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
Reference in New Issue
Block a user