~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
-- source include/have_debug.inc
2
3
#
4
# Bug #28499: crash for grouping query when tmp_table_size is too small
5
#
6
7
DROP TABLE IF EXISTS t1;
8
9
CREATE TABLE t1 (
10
  a varchar(32) character set utf8 collate utf8_bin NOT NULL,
11
  b varchar(32) character set utf8 collate utf8_bin NOT NULL )
12
ENGINE=MyISAM DEFAULT CHARSET=utf8;
13
14
INSERT INTO t1 VALUES
15
  ('AAAAAAAAAA','AAAAAAAAAA'), ('AAAAAAAAAB','AAAAAAAAAB '),
16
  ('AAAAAAAAAB','AAAAAAAAAB'), ('AAAAAAAAAC','AAAAAAAAAC'),
17
  ('AAAAAAAAAD','AAAAAAAAAD'), ('AAAAAAAAAE','AAAAAAAAAE'),
18
  ('AAAAAAAAAF','AAAAAAAAAF'), ('AAAAAAAAAG','AAAAAAAAAG'),
19
  ('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
20
  ('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
21
22
set tmp_table_size=1024;
23
24
--replace_regex /in table '[^']+'/in table 'tmp_table'/
25
--error ER_DUP_KEY
26
SELECT MAX(a) FROM t1 GROUP BY a,b;
27
28
set tmp_table_size=default;
29
30
DROP TABLE t1;