summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-06-09 23:32:20 +0300
committerunknown <bell@sanja.is.com.ua>2004-06-09 23:32:20 +0300
commit07b5fdbcdb656b46c83d3585dc548107b5711609 (patch)
tree245eec6a233c1233f75284cfd2d619b0afe4c28b /mysql-test/r
parent5304a03e997d520a60d98a5e27da92a0d3efb8d0 (diff)
downloadmariadb-git-07b5fdbcdb656b46c83d3585dc548107b5711609.tar.gz
do not unlock tables early if we have subquery in HAVING clause (BUG#3984)
mysql-test/r/subselect_innodb.result: test of unlocking innodb tables and subquery in HAVING clause mysql-test/t/subselect_innodb.test: test of unlocking innodb tables and subquery in HAVING clause sql/item_subselect.cc: mark SELECT with subquery in HAVING clause sql/sql_lex.cc: mark SELECT with subquery in HAVING clause sql/sql_lex.h: mark SELECT with subquery in HAVING clause sql/sql_select.cc: do not unlock tables early if we have subquery in HAVING clause
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/subselect_innodb.result10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result
index 9c1816e295c..bbbc607b6f8 100644
--- a/mysql-test/r/subselect_innodb.result
+++ b/mysql-test/r/subselect_innodb.result
@@ -96,3 +96,13 @@ id value (select t1.value from t1 where t1.id=t2.id)
1 z a
2 x b
drop table t1,t2;
+create table t1 (a int, b int) engine=innodb;
+insert into t1 values (1,2), (1,3), (2,3), (2,4), (2,5), (3,4), (4,5), (4,100);
+create table t2 (a int) engine=innodb;
+insert into t2 values (1),(2),(3),(4);
+select a, sum(b) as b from t1 group by a having b > (select max(a) from t2);
+a b
+1 5
+2 12
+4 105
+drop table t1, t2;