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/r/subselect_mat.result | |
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/r/subselect_mat.result')
-rw-r--r-- | mysql-test/r/subselect_mat.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 31a9227ab0f..f8bafa03bed 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -1728,6 +1728,19 @@ FROM t4 , t5 ); f1 f5 DROP TABLE t1, t2, t3, t4, t5; +# +# BUG#901032: Wrong result for MIN/MAX on an indexed column with materialization and semijoin +# +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); +MIN(a) +1 +DROP TABLE t1,t2,t3; # This must be at the end: set optimizer_switch=@subselect_sj_mat_tmp; set @subselect_mat_test_optimizer_switch_value=null; |