summaryrefslogtreecommitdiff
path: root/mysql-test/t/group_by.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-11-03 17:47:37 +0100
committerSergei Golubchik <sergii@pisem.net>2014-11-03 17:47:37 +0100
commit2160646c1dba788a9b12bed999547ac01df33e7c (patch)
tree944314db59d0fd4d8fa1d87e53e1e1cb49610c49 /mysql-test/t/group_by.test
parentd1ca1c1faeb1e43df1533a10dfa0ac79433227f9 (diff)
parent50556e7e9ac3cf0bad629cc3eb4b57f82cf807e4 (diff)
downloadmariadb-git-2160646c1dba788a9b12bed999547ac01df33e7c.tar.gz
5.5 merge
Diffstat (limited to 'mysql-test/t/group_by.test')
-rw-r--r--mysql-test/t/group_by.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index 5d59acf9320..35bd447e9ea 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1650,6 +1650,20 @@ SET sql_mode='ONLY_FULL_GROUP_BY';
SELECT 1 AS test UNION SELECT 2 AS test ORDER BY test IS NULL ASC;
SET sql_mode='';
+--echo #
+--echo # MDEV-6484: Assertion `tab->ref.use_count' failed on query with joins, constant table, multi-part key
+--echo #
+CREATE TABLE t1 (i1 INT, c1 VARCHAR(1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (6,'b');
+
+CREATE TABLE t2 (pk2 INT, i2 INT, c2 VARCHAR(1), PRIMARY KEY(pk2), KEY(pk2,i2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,2,'s'),(2,4,'r'),(3,8,'m'),(4,4,'b'),(5,4,'x'),(6,7,'g'),(7,4,'p');
+
+SELECT i2 FROM t1 AS t1a STRAIGHT_JOIN ( t2 INNER JOIN t1 AS t1b ON (t1b.c1 = c2) ) ON (t1b.i1 = pk2 )
+WHERE t1a.c1 = c2 GROUP BY i2;
+
+DROP TABLE t1,t2;
+
#
# End of MariaDB 5.5 tests
#