1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

A fix (bug #6142: SELECT DISTINCT on key field crashes server)

sql/opt_range.cc:
  A fix (bug #6142: SELECT DISTINCT on key field crashes server)
  Code clean-up.
This commit is contained in:
unknown
2004-10-20 21:01:52 +05:00
parent 00bbd9a252
commit 53eb9871ad
3 changed files with 19 additions and 4 deletions

View File

@ -1897,3 +1897,9 @@ id select_type table type possible_keys key key_len ref rows Extra
drop table t1;
drop table t2;
drop table t3;
create table t1 (
a varchar(30), b varchar(30), primary key(a), key(b)
) engine=innodb;
select distinct a from t1;
a
drop table t1;

View File

@ -577,3 +577,13 @@ explain select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b;
drop table t1;
drop table t2;
drop table t3;
#
# Bug #6142: a problem with the empty innodb table
#
create table t1 (
a varchar(30), b varchar(30), primary key(a), key(b)
) engine=innodb;
select distinct a from t1;
drop table t1;