diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
commit | 2e4984c185ddcd2da789017cd147338846ff409a (patch) | |
tree | 0293831900c860600efbaa747ea886d9d1cbf5bd /mysql-test/t/group_by_innodb.test | |
parent | 792b53e80806df893ee62c9a1c1bd117114c8c6d (diff) | |
parent | a6087e7dc1ef3561d8189c8db15e9591d0f9b520 (diff) | |
download | mariadb-git-10.0-FusionIO.tar.gz |
Merge tag 'mariadb-10.0.20' into 10.0-FusionIO10.0-FusionIO
Conflicts:
storage/innobase/os/os0file.cc
storage/xtradb/os/os0file.cc
storage/xtradb/srv/srv0start.cc
Diffstat (limited to 'mysql-test/t/group_by_innodb.test')
-rw-r--r-- | mysql-test/t/group_by_innodb.test | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/t/group_by_innodb.test b/mysql-test/t/group_by_innodb.test index 75ee3d0802a..e072a94fada 100644 --- a/mysql-test/t/group_by_innodb.test +++ b/mysql-test/t/group_by_innodb.test @@ -85,4 +85,44 @@ a.oid=b.oid WHERE a.oidGroup=1 GROUP BY a.oid; DROP TABLE t1, t2; +--echo # +--echo # MDEV-7193: Incorrect Query Result (MySQL Bug 68897) in MariaDB 10.0.14 +--echo # (fixed by MDEV-5719) +--echo # + +CREATE TABLE `t1` ( + `param` int(11) NOT NULL, + `idx` int(11) NOT NULL, + `text` varchar(255) default NULL, + PRIMARY KEY (`param`,`idx`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `t1` (`param`, `idx`, `text`) VALUES +(1, 0, 'select'), +(1, 1, 'Kabel mit Stecker 5-polig'), +(1, 2, 'Kabel ohne Stecker'), +(2, 0, 'number'), +(2, 1, '22'), +(2, 2, '25'); +CREATE TABLE `t2` ( + `id` int PRIMARY KEY +); + +INSERT INTO t2 VALUES (1),(2),(3),(4); +SELECT t2.id AS id, T.text AS xtext,GROUP_CONCAT(T3.text) AS optionen +FROM t2 +LEFT JOIN t1 AS T ON(T.param=t2.id AND T.idx=0 ) +LEFT JOIN t1 AS T3 ON(T3.param=t2.id AND T3.idx>0 ) +GROUP BY t2.id +ORDER BY id ASC; + +SELECT t2.id AS id, T.text AS xtext,GROUP_CONCAT(T3.text) AS optionen +FROM t2 +LEFT JOIN t1 AS T ON(T.param=t2.id AND T.idx=0 ) +LEFT JOIN t1 AS T3 ON(T3.param=t2.id AND T3.idx>0 ) +GROUP BY t2.id +ORDER BY id DESC; + +DROP TABLE t1, t2; + --echo # End of tests |