diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-08-28 12:22:56 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-08-28 12:22:56 +0300 |
commit | 7830fb7f45b3824c0375c00ae2cab357165904cf (patch) | |
tree | 730521737fdc48e69f7650819e9a29da6487e1f4 /mysql-test/main/group_min_max.test | |
parent | b805ebd7ed49868f83e6fd3fe72a11ddacdce452 (diff) | |
parent | 55163ba1bdb1a05daadc66c41c959994231b361c (diff) | |
download | mariadb-git-7830fb7f45b3824c0375c00ae2cab357165904cf.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/main/group_min_max.test')
-rw-r--r-- | mysql-test/main/group_min_max.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/main/group_min_max.test b/mysql-test/main/group_min_max.test index b0bc42d7f8c..adad9073235 100644 --- a/mysql-test/main/group_min_max.test +++ b/mysql-test/main/group_min_max.test @@ -1609,5 +1609,32 @@ explain select min(a) from t1 where a between "abbbbbbbbbbbbbbbbbbbb" and "Cafe2 drop table t1; --echo # +--echo # MDEV-15433: Optimizer does not use group by optimization with distinct +--echo # + +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a INT NOT NULL, KEY(a)); +--disable_query_log +INSERT INTO t1(a) VALUES (1), (2), (3), (4); +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +--enable_query_log +OPTIMIZE TABLE t1; +EXPLAIN SELECT DISTINCT a FROM t1; +SELECT DISTINCT a FROM t1; +drop table t1; + +--echo # --echo # End of 10.1 tests --echo # |