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

into  moonbone.local:/work/16302-bug-4.1-opt-mysql
This commit is contained in:
evgen@moonbone.local 2006-07-11 17:48:33 +04:00
commit ff3ffe5c39
3 changed files with 30 additions and 1 deletions

View file

@ -2835,3 +2835,21 @@ a
4
DROP TABLE t1,t2,t3;
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

View file

@ -1820,4 +1820,14 @@ DROP TABLE t1,t2,t3;
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

View file

@ -705,7 +705,8 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if (!select_lex->group_list.elements &&
!select_lex->having &&
!select_lex->with_sum_func &&
!(select_lex->next_select()))
!(select_lex->next_select()) &&
select_lex->table_list.elements)
{
Item_sum_hybrid *item;
if (func->l_op())