diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-12-08 02:12:48 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-12-08 02:12:48 +0400 |
commit | 49ecc880699b9627a1fbec8fa5c4d025ccb9a7cf (patch) | |
tree | 1dba8b1a26faac1dc90ff8d20019dc7871b57761 /mysql-test/t/subselect_sj_mat.test | |
parent | 7414a0b6d6307f8c2644660cf2f8daf986c25970 (diff) | |
download | mariadb-git-49ecc880699b9627a1fbec8fa5c4d025ccb9a7cf.tar.gz |
BUG#901032: Wrong result for MIN/MAX on an indexed column with materialization and semijoin
- opt_sum_query() should not assume that join tables from sj-materialization
have known numbers of rows.
Diffstat (limited to 'mysql-test/t/subselect_sj_mat.test')
-rw-r--r-- | mysql-test/t/subselect_sj_mat.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test index 4ddc19f49f5..c2badddba5b 100644 --- a/mysql-test/t/subselect_sj_mat.test +++ b/mysql-test/t/subselect_sj_mat.test @@ -1428,6 +1428,19 @@ ON ( t2.f5 ) IN ( DROP TABLE t1, t2, t3, t4, t5; +--echo # +--echo # BUG#901032: Wrong result for MIN/MAX on an indexed column with materialization and semijoin +--echo # +CREATE TABLE t1 ( a INT, KEY(a) ); +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 ( b INT ); +INSERT INTO t2 VALUES (2); +CREATE TABLE t3 ( c INT ); +INSERT INTO t3 VALUES (2); + +SELECT MIN(a) FROM t1, t2 WHERE b IN (SELECT c FROM t3 GROUP BY c); + +DROP TABLE t1,t2,t3; --echo # This must be at the end: set optimizer_switch=@subselect_sj_mat_tmp; |