diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-06-10 10:14:20 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-06-10 10:14:20 +0200 |
commit | 10fedf675a1de161aec4ee09026db35400344507 (patch) | |
tree | c7487c3764bc9e7c96dd7b8cda101d197c4f3fc7 /mysql-test/r/distinct.result | |
parent | fdfeb4bea389f32fdc5fb493e3d003f9ed9d4713 (diff) | |
download | mariadb-git-10fedf675a1de161aec4ee09026db35400344507.tar.gz |
change test_if_equality_guarantees_uniqueness()
from an ad hoc set of limitations
to a correct rule
Diffstat (limited to 'mysql-test/r/distinct.result')
-rw-r--r-- | mysql-test/r/distinct.result | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index fdd26d7e543..eafd16440b0 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -804,6 +804,32 @@ select distinct a from t1 where a = DATE('2010-10-10'); a 2010-10-10 20101010 +explain select distinct a from t1 where a = DATE('2010-10-10'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where; Using temporary +drop table t1; +# date = string +create table t1 (a date); +insert t1 values ('2010-10-10'), ('20101010'); +explain select distinct a from t1 where a = '2010-10-10'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +drop table t1; +# double = string +create table t1 (a double); +insert t1 values (2), (2); +explain select distinct a from t1 where a = '2'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +# double = int +explain select distinct a from t1 where a = 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +# string = double +alter table t1 modify a varchar(100); +explain select distinct a from t1 where a = 2e0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where; Using temporary drop table t1; create table t1 (f1 varchar(40)); insert into t1 values ('2010-10-10 00:00:00.0001'),('2010-10-10 00:00:00.0002'),('2010-10-10 00:00:00.0003'); |