bug46080.test 684 Bytes
Newer Older
1 2 3 4 5
--echo #
--echo # Bug #46080: group_concat(... order by) crashes server when
--echo #  sort_buffer_size cannot allocate
--echo #

6 7 8
call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'");
call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k");

9 10 11 12 13 14
CREATE TABLE t1(a CHAR(255));
INSERT INTO t1 VALUES ('a');

SET @@SESSION.sort_buffer_size=5*16*1000000;
SET @@SESSION.max_heap_table_size=5*1000000;

15
--echo # Must not crash.
16 17
--disable_result_log
--error 0,5
18
SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a;
19
--enable_result_log
20 21 22 23 24 25

DROP TABLE t1;
SET @@SESSION.sort_buffer_size=default;
SET @@SESSION.max_heap_table_size=default;

--echo End of 5.0 tests