summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-03-20 13:36:26 +0200
committerunknown <bell@sanja.is.com.ua>2004-03-20 13:36:26 +0200
commitf379d7b172401206de5654f52466601de874cade (patch)
treede1ab82158f22c98608b574edb706c1f3de591b5 /sql/item_subselect.cc
parent647498e9657b7d68faf0cb24bac43a940238920c (diff)
downloadmariadb-git-f379d7b172401206de5654f52466601de874cade.tar.gz
after review changes
sql/item.cc: removed double_fix & already_fixed in Item_field sql/item.h: added quick_fix_field() for cases when we are sure that no need full fix_field processing fixed neg() method for numeric constants to have the same logic as constant parser Item_null, Item_real, ... are constant which are fixed by creation sql/item_cmpfunc.h: right fix_fields in and_conds call sql/item_func.cc: changed Item_field constructor call fix_field emulation call sql/item_strfunc.cc: correct layout sql/item_subselect.cc: correct layout changed Item_field constructor call sql/item_sum.cc: changed Item_field constructor call sql/item_sum.h: changed Item_field constructor call sql/sql_base.cc: fixed layout right fix_fields calls sql/sql_help.cc: changed Item_field constructor call sql/sql_load.cc: changed Item_field constructor call sql/sql_parse.cc: constant changed sql/sql_select.cc: fixed layout fix_field emulation insted of real fix_fields call sql/sql_show.cc: changed Item_field constructor call sql/sql_union.cc: changed Item_field constructor call double_fix removed sql/sql_update.cc: renamed variable, fixed layout sql/sql_yacc.yy: typo fixed fix_fields emulation calls hegation of numbers fixed
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index b0f5e3ba9d4..196b54141d1 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -116,6 +116,8 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref)
{
if (substitution)
{
+ int ret= 0;
+
// did we changed top item of WHERE condition
if (unit->outer_select()->where == (*ref))
unit->outer_select()->where= substitution; // correct WHERE for PS
@@ -127,7 +129,6 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref)
substitution= 0;
fixed= 1;
thd->where= "checking transformed subquery";
- int ret= 0;
if (!(*ref)->fixed)
ret= (*ref)->fix_fields(thd, tables, ref);
// We can't substitute aggregate functions (like (SELECT (max(i)))
@@ -204,7 +205,7 @@ bool Item_subselect::const_item() const
Item *Item_subselect::get_tmp_table_item(THD *thd)
{
if (!with_sum_func && !const_item())
- return new Item_field(result_field, 1);
+ return new Item_field(result_field);
return copy_or_same(thd);
}