Commit ff3ffe5c authored by evgen@moonbone.local's avatar evgen@moonbone.local

Merge moonbone.local:/work/allany-4.1-mysql

into  moonbone.local:/work/16302-bug-4.1-opt-mysql
parents a65bf3bf 4235ab7e
...@@ -2835,3 +2835,21 @@ a ...@@ -2835,3 +2835,21 @@ a
4 4
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
purge master logs before (select adddate(current_timestamp(), interval -4 day)); purge master logs before (select adddate(current_timestamp(), interval -4 day));
select 1 from dual where 1 < any (select 2);
1
1
select 1 from dual where 1 < all (select 2);
1
1
select 1 from dual where 2 > any (select 1);
1
1
select 1 from dual where 2 > all (select 1);
1
1
select 1 from dual where 1 < any (select 2 from dual);
1
1
select 1 from dual where 1 < all (select 2 from dual where 1!=1);
1
1
...@@ -1820,4 +1820,14 @@ DROP TABLE t1,t2,t3; ...@@ -1820,4 +1820,14 @@ DROP TABLE t1,t2,t3;
purge master logs before (select adddate(current_timestamp(), interval -4 day)); purge master logs before (select adddate(current_timestamp(), interval -4 day));
#
# Bug#16302: Quantified subquery without any tables gives wrong results
#
select 1 from dual where 1 < any (select 2);
select 1 from dual where 1 < all (select 2);
select 1 from dual where 2 > any (select 1);
select 1 from dual where 2 > all (select 1);
select 1 from dual where 1 < any (select 2 from dual);
select 1 from dual where 1 < all (select 2 from dual where 1!=1);
# End of 4.1 tests # End of 4.1 tests
...@@ -705,7 +705,8 @@ Item_in_subselect::single_value_transformer(JOIN *join, ...@@ -705,7 +705,8 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if (!select_lex->group_list.elements && if (!select_lex->group_list.elements &&
!select_lex->having && !select_lex->having &&
!select_lex->with_sum_func && !select_lex->with_sum_func &&
!(select_lex->next_select())) !(select_lex->next_select()) &&
select_lex->table_list.elements)
{ {
Item_sum_hybrid *item; Item_sum_hybrid *item;
if (func->l_op()) if (func->l_op())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment