Debian Codegraph @

mysql-test/suite/maria/distinct.test

raw
1 #
2 # MDEV-4280:
3 # Assertion `empty_size == empty_size_on_page' failure in ma_blockrec.c or
4 # ER_NOT_KEYFILE on query with DISTINCT and GROUP BY
5 #
6 # This issue was a bug in how we delete row during duplicate removal when
7 # we use Aria for internal temporary table.
8 #
9
10 -- source include/have_maria.inc
11
12 --disable_warnings
13 DROP TABLE IF EXISTS t1;
14 --enable_warnings
15
16 CREATE TABLE t1 (a INT, b INT) ENGINE=Aria;
17 INSERT t1 VALUES (3,2004),(2,2006),(1,2007),(3,2008),(2,2005),(2,2001);
18 SELECT GROUP_CONCAT(a) FROM t1 GROUP BY b;
19 SELECT DISTINCT GROUP_CONCAT(a) FROM t1 GROUP BY b;
20 DROP TABLE t1;
21
22 CREATE TABLE t1 (a INT, b VARCHAR(1)) ENGINE=MyISAM;
23 INSERT INTO t1 VALUES (7,'q'),(2,NULL),(7,'g'),(6,'x');
24 SELECT DISTINCT MAX( a ) FROM t1 GROUP BY b ORDER BY MD5( b );
25 DROP TABLE t1;