diff options
author | unknown <gkodinov/kgeorge@macbook.local> | 2007-01-08 12:32:48 +0200 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.local> | 2007-01-08 12:32:48 +0200 |
commit | cea66abf7b87581ade53b06df508b627d92c5151 (patch) | |
tree | ec29d949a37f6bf2a4269e9c9e8ad3b20a8051e5 /mysql-test/r/distinct.result | |
parent | d9ec5a4e83a0b94bc106bc17c8487b449dc03d38 (diff) | |
parent | 42e31f7a45413b685c4332ced1d983ccfda29d25 (diff) | |
download | mariadb-git-cea66abf7b87581ade53b06df508b627d92c5151.tar.gz |
Merge macbook.local:/Users/kgeorge/mysql/work/mysql-5.0-opt
into macbook.local:/Users/kgeorge/mysql/work/merge-5.1-opt
mysql-test/r/distinct.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
storage/myisam/mi_check.c:
Auto merged
sql/sql_udf.cc:
SCCS merged
Diffstat (limited to 'mysql-test/r/distinct.result')
-rw-r--r-- | mysql-test/r/distinct.result | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 72c040cb25f..e1a8a3151e9 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -607,3 +607,40 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT DISTINCT a,a FROM t1 WHERE b < 12 ORDER BY a; a a DROP TABLE t1; +CREATE TABLE t1 (a CHAR(1)); +INSERT INTO t1 VALUES('A'), (0); +SELECT a FROM t1 WHERE a=0; +a +A +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'A' +SELECT DISTINCT a FROM t1 WHERE a=0; +a +A +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'A' +DROP TABLE t1; +CREATE TABLE t1 (a DATE); +INSERT INTO t1 VALUES ('1972-07-29'), ('1972-02-06'); +EXPLAIN SELECT (SELECT DISTINCT a FROM t1 WHERE a = '2002-08-03'); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where +EXPLAIN SELECT (SELECT DISTINCT ADDDATE(a,1) FROM t1 +WHERE ADDDATE(a,1) = '2002-08-03'); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where; Using temporary +CREATE TABLE t2 (a CHAR(5) CHARACTER SET latin1 COLLATE latin1_general_ci); +INSERT INTO t2 VALUES (0xf6); +INSERT INTO t2 VALUES ('oe'); +SELECT COUNT(*) FROM (SELECT DISTINCT a FROM t2) dt; +COUNT(*) +2 +SELECT COUNT(*) FROM +(SELECT DISTINCT a FROM t2 WHERE a='oe' COLLATE latin1_german2_ci) dt; +COUNT(*) +2 +DROP TABLE t1, t2; |