diff options
author | unknown <monty@mysql.com> | 2004-03-26 14:44:52 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-03-26 14:44:52 +0200 |
commit | cc11f6f351e8056dabf47cf47f8a29aa3b6261a2 (patch) | |
tree | 5a81f759a80325c592c9d532356639e7dd272728 /mysql-test/t/myisam.test | |
parent | 922818a79809d789976e64a8b4faabd305863a7c (diff) | |
download | mariadb-git-cc11f6f351e8056dabf47cf47f8a29aa3b6261a2.tar.gz |
Allow keys with 0 segements in MyISAM
This fixed a bug in SELECT DISTINCT when all selected parts where constants. (Bug #3203)
myisam/mi_create.c:
Allow keys with 0 segements.
mysql-test/r/myisam.result:
Test for problem with SELECT DISTINCT
mysql-test/t/myisam.test:
Test for problem with SELECT DISTINCT
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r-- | mysql-test/t/myisam.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 7302e5dfdda..59b86309d77 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -422,3 +422,17 @@ update t1 set b='b ' where a > 1; delete from t1 where b='b'; select a,concat(b,'.') from t1; drop table t1; + +# +# Test keys with 0 segments. (Bug #3203) +# +create table t1 (a int not null); +create table t2 (a int not null, primary key (a)); +insert into t1 values (1); +insert into t2 values (1),(2); +select sql_big_result distinct t1.a from t1,t2 order by t2.a; +select distinct t1.a from t1,t2 order by t2.a; +select sql_big_result distinct t1.a from t1,t2; +explain select sql_big_result distinct t1.a from t1,t2 order by t2.a; +explain select distinct t1.a from t1,t2 order by t2.a; +drop table t1,t2; |