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:
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user