diff options
author | unknown <gluh@eagle.(none)> | 2007-02-02 10:25:45 +0400 |
---|---|---|
committer | unknown <gluh@eagle.(none)> | 2007-02-02 10:25:45 +0400 |
commit | ed0e4a968a4dfba3788bc270c73620f3e498dca5 (patch) | |
tree | a499a38ce070d521a711fde73af6cb95e3713dc3 /mysql-test/r/distinct.result | |
parent | 4ebef0520629873253ed5007aba1a01c91d7f8fd (diff) | |
parent | a30830460794651c0e9fc5ec4779cf77680514ee (diff) | |
download | mariadb-git-ed0e4a968a4dfba3788bc270c73620f3e498dca5.tar.gz |
Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
mysql-test/r/distinct.result:
Auto merged
mysql-test/r/join_nested.result:
Auto merged
mysql-test/r/null_key.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/subselect3.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/func_time.result:
manual merge
mysql-test/r/information_schema.result:
manual merge
mysql-test/t/func_time.test:
manual merge
mysql-test/t/information_schema.test:
manual merge
sql/opt_range.cc:
manual merge
sql/sql_delete.cc:
manual merge
sql/sql_lex.h:
manual merge
Diffstat (limited to 'mysql-test/r/distinct.result')
-rw-r--r-- | mysql-test/r/distinct.result | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index e1a8a3151e9..109ddcd02e1 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -530,7 +530,8 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT DISTINCT a,b FROM t1 GROUP BY a,b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 -CREATE TABLE t2(a INT, b INT, c INT, d INT, PRIMARY KEY (a,b)); +CREATE TABLE t2(a INT, b INT NOT NULL, c INT NOT NULL, d INT, +PRIMARY KEY (a,b)); INSERT INTO t2 VALUES (1,1,1,50), (1,2,3,40), (2,1,3,4); EXPLAIN SELECT DISTINCT a FROM t2; id select_type table type possible_keys key key_len ref rows Extra @@ -644,3 +645,26 @@ SELECT COUNT(*) FROM COUNT(*) 2 DROP TABLE t1, t2; +CREATE TABLE t1 (a INT, UNIQUE (a)); +INSERT INTO t1 VALUES (4),(null),(2),(1),(null),(3); +EXPLAIN SELECT DISTINCT a FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 6 Using index +SELECT DISTINCT a FROM t1; +a +NULL +1 +2 +3 +4 +EXPLAIN SELECT a FROM t1 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 6 Using index +SELECT a FROM t1 GROUP BY a; +a +NULL +1 +2 +3 +4 +DROP TABLE t1; |