From 96174d9d4e493597395e74b69ea628afe361546a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Dec 2002 21:39:35 +0200 Subject: Fixed max_key_length when using UNIQUE keys. This fixed a bug in GROUP BY on a BLOB column with NULL values. myisam/mi_create.c: Fixed max_key_length when using UNIQUE keys. myisam/mi_unique.c: Simple optimization Make different CRC for keys with null and empty strings. mysql-test/r/group_by.result: Updated results mysql-test/t/group_by.test: Test of bug --- mysql-test/t/group_by.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t/group_by.test') 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; -- cgit v1.2.1