1
by brian
clean slate |
1 |
#
|
2 |
# Bug #28499: crash for grouping query when tmp_table_size is too small
|
|
3 |
#
|
|
779.3.34
by Monty Taylor
Fixed small_tmp_table - needed a --disable_warnings around the create table if not exists. |
4 |
--disable_warnings |
1
by brian
clean slate |
5 |
DROP TABLE IF EXISTS t1; |
779.3.34
by Monty Taylor
Fixed small_tmp_table - needed a --disable_warnings around the create table if not exists. |
6 |
--enable_warnings |
1
by brian
clean slate |
7 |
|
8 |
CREATE TABLE t1 ( |
|
722.2.19
by Monty Taylor
Turned on small_tmp_table. |
9 |
a varchar(32) collate utf8_bin NOT NULL, |
10 |
b varchar(32) collate utf8_bin NOT NULL ); |
|
1
by brian
clean slate |
11 |
|
12 |
INSERT INTO t1 VALUES |
|
13 |
('AAAAAAAAAA','AAAAAAAAAA'), ('AAAAAAAAAB','AAAAAAAAAB '), |
|
14 |
('AAAAAAAAAB','AAAAAAAAAB'), ('AAAAAAAAAC','AAAAAAAAAC'), |
|
15 |
('AAAAAAAAAD','AAAAAAAAAD'), ('AAAAAAAAAE','AAAAAAAAAE'), |
|
16 |
('AAAAAAAAAF','AAAAAAAAAF'), ('AAAAAAAAAG','AAAAAAAAAG'), |
|
17 |
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'), |
|
18 |
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK'); |
|
19 |
||
20 |
set tmp_table_size=1024; |
|
21 |
||
1731.3.1
by Lee Bieber
change tests to use enum values instead of error numbers |
22 |
--error ER_USE_SQL_BIG_RESULT |
1487.1.1
by Brian Aker
There is room for improvement around this. We should be using rows as well |
23 |
SELECT MAX(a) FROM t1 GROUP BY a,b; |
24 |
||
1
by brian
clean slate |
25 |
--replace_regex /in table '[^']+'/in table 'tmp_table'/ |
1487.1.1
by Brian Aker
There is room for improvement around this. We should be using rows as well |
26 |
SELECT SQL_BIG_RESULT MAX(a) FROM t1 GROUP BY a,b; |
1
by brian
clean slate |
27 |
|
28 |
set tmp_table_size=default; |
|
29 |
||
30 |
DROP TABLE t1; |