diff options
author | monty@mashka.mysql.fi <> | 2002-12-27 21:39:35 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-12-27 21:39:35 +0200 |
commit | f22fde21c0667042dd716d9c07081565b7a56c5c (patch) | |
tree | 80868d909a3253f702316058295646695044c0d3 /mysql-test | |
parent | fc8a78955b91226f1c8bad594e954c4b8a21612f (diff) | |
download | mariadb-git-f22fde21c0667042dd716d9c07081565b7a56c5c.tar.gz |
Fixed max_key_length when using UNIQUE keys.
This fixed a bug in GROUP BY on a BLOB column with NULL values.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/group_by.result | 8 | ||||
-rw-r--r-- | mysql-test/t/group_by.test | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 0b720bc3d97..3bd3eeb5efd 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -102,3 +102,11 @@ pid c1id c2id value id active id active 1 4 NULL 4 4 Yes NULL NULL max(value) 4 +a count(*) +NULL 9 + 3 +b 1 +a count(*) +NULL 9 + 3 +b 1 diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index db6baec4b9f..b21ae88007b 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -312,3 +312,14 @@ m.c1id = c1.id AND c1.active = 'Yes' LEFT JOIN t3 AS c2 ON m.c2id = c2.id AND c2.active = 'Yes' WHERE m.pid=1 AND (c1.id IS NOT NULL OR c2.id IS NOT NULL); drop table t1,t2,t3; + +# +# Test bug in GROUP BY on BLOB that is NULL or empty +# + +create table t1 (a blob null); +insert into t1 values (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(""),(""),(""),("b"); +select a,count(*) from t1 group by a; +set option sql_big_tables=1; +select a,count(*) from t1 group by a; +drop table t1; |