1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge gleb.loc:/home/uchum/5.0-opt

into  gleb.loc:/home/uchum/5.1-opt


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sp_rcontext.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
mysql-test/r/subselect.result:
  Merge with 5.0-opt.
mysql-test/t/subselect.test:
  Merge with 5.0-opt.
This commit is contained in:
unknown
2007-11-11 06:07:38 +04:00
9 changed files with 132 additions and 14 deletions

View File

@@ -1760,7 +1760,7 @@ void subselect_engine::set_row(List<Item> &item_list, Item_cache **row)
item->decimals= sel_item->decimals;
item->unsigned_flag= sel_item->unsigned_flag;
maybe_null= sel_item->maybe_null;
if (!(row[i]= Item_cache::get_cache(res_type)))
if (!(row[i]= Item_cache::get_cache(sel_item)))
return;
row[i]->setup(sel_item);
}
@@ -2222,6 +2222,7 @@ int subselect_indexsubquery_engine::exec()
((Item_in_subselect *) item)->value= 0;
empty_result_set= TRUE;
null_keypart= 0;
table->status= 0;
if (check_null)
{
@@ -2234,6 +2235,16 @@ int subselect_indexsubquery_engine::exec()
if (copy_ref_key())
DBUG_RETURN(1);
if (table->status)
{
/*
We know that there will be no rows even if we scan.
Can be set in copy_ref_key.
*/
((Item_in_subselect *) item)->value= 0;
DBUG_RETURN(0);
}
if (null_keypart)
DBUG_RETURN(scan_table());