summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria/t/distinct.test
blob: f326b5a691f50ea47d8973c2c1db75c0718ee4f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
# MDEV-4280:
# Assertion `empty_size == empty_size_on_page' failure in ma_blockrec.c or
# ER_NOT_KEYFILE on query with DISTINCT and GROUP BY
#
# This issue was a bug in how we delete row during duplicate removal when
# we use Aria for internal temporary table.
# 

-- source include/have_maria.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

CREATE TABLE t1 (a INT, b INT) ENGINE=Aria;
INSERT t1 VALUES (3,2004),(2,2006),(1,2007),(3,2008),(2,2005),(2,2001);
SELECT GROUP_CONCAT(a) FROM t1 GROUP BY b;
SELECT DISTINCT GROUP_CONCAT(a) FROM t1 GROUP BY b;
DROP TABLE t1;