mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -711,3 +711,14 @@ select min(b) from t1;
|
||||
min(b)
|
||||
3000000000
|
||||
drop table t1;
|
||||
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;
|
||||
hostname no
|
||||
cache-dtc-af05.proxy.aol.com 1
|
||||
|
Reference in New Issue
Block a user