diff options
author | unknown <igor@rurik.mysql.com> | 2005-06-07 03:05:57 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-06-07 03:05:57 -0700 |
commit | 4da133cabf43b4c53f33f5d529b2b7d7b43af3d5 (patch) | |
tree | 1567594821af194ea5d889382825c2064b87ccf0 /mysql-test/t/group_by.test | |
parent | 936b9319b8219daffab3bc6650a02801bf53c8bd (diff) | |
download | mariadb-git-4da133cabf43b4c53f33f5d529b2b7d7b43af3d5.tar.gz |
sql_select.cc, item_buff.cc, item.h:
Fixed bug #11088: a crash for queries with GROUP BY a BLOB column
+ COUNT(DISTINCT...) due to an attempt to allocate a too large
buffer for the BLOB field.
Now the size of the buffer is limited by max_sort_length.
group_by.test, group_by.result:
Added a test case for bug #11088.
mysql-test/r/group_by.result:
Added a test case for bug #11088.
mysql-test/t/group_by.test:
Added a test case for bug #11088.
sql/item.h:
Fixed bug #11088: a crash for queries with GROUP BY a BLOB column
+ COUNT(DISTINCT...) due to an attempt to allocate a too large
buffer for the BLOB fields.
Now the size of the buffer is limited by max_sort_length.
sql/item_buff.cc:
Fixed bug #11088: a crash for queries with GROUP BY a BLOB column
+ COUNT(DISTINCT...) due to an attempt to allocate a too large
buffer for the BLOB fields.
Now the size of the buffer is limited by max_sort_length.
sql/sql_select.cc:
Fixed bug #11088: a crash for queries with GROUP BY a BLOB column
+ COUNT(DISTINCT...) due to an attempt to allocate a too large
buffer for the BLOB fields.
Now the size of the buffer is limited by max_sort_length.
Diffstat (limited to 'mysql-test/t/group_by.test')
-rw-r--r-- | mysql-test/t/group_by.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index fbd39019e6d..21d5abcc287 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -522,3 +522,20 @@ insert into t1 values(3000000000); select * from t1; select min(b) from t1; drop table t1; + +# +# Test for bug #11088: GROUP BY a BLOB colimn with COUNT(DISTINCT column1) +# + +CREATE TABLE t1 (id int PRIMARY KEY, user_id int, hostname longtext); + +INSERT INTO t1 VALUES + (1, 7, 'cache-dtc-af05.proxy.aol.com'), + (2, 3, 'what.ever.com'), + (3, 7, 'cache-dtc-af05.proxy.aol.com'), + (4, 7, 'cache-dtc-af05.proxy.aol.com'); + +SELECT hostname, COUNT(DISTINCT user_id) as no FROM t1 + WHERE hostname LIKE '%aol%' + GROUP BY hostname; + |