summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-02-02 23:30:01 +0200
committerunknown <bell@sanja.is.com.ua>2003-02-02 23:30:01 +0200
commite1134143e8b6feff7fcab4354cf7c951dba09f81 (patch)
treeb229dc72a1874a4a2e8c467d58a8a97d6cd597f4 /sql/sql_base.cc
parent982262333345aab1644ba80fae457d0400a10b16 (diff)
downloadmariadb-git-e1134143e8b6feff7fcab4354cf7c951dba09f81.tar.gz
after-review changes (577 SCRUM)
sql/item.cc: typo fix sql/item.h: typo fix sql/item_cmpfunc.cc: comment sql/item_func.cc: new interface sql/item_subselect.cc: comment inserted sql/item_sum.cc: layout fixed comment inserted sql/mysql_priv.h: names changed sql/sql_base.cc: some optimization sql/sql_delete.cc: name changed sql/sql_insert.cc: name changed sql/sql_lex.h: name changed sql/sql_prepare.cc: layout fixed sql/sql_select.cc: layout fixed names changed comments inserted debugging code removed sql/sql_select.h: name changed sql/sql_union.cc: name changed layout fixed sql/sql_update.cc: name changed sql/sql_yacc.yy: typo fixed
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 6e5198f979d..21cdaa28a4f 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1949,14 +1949,15 @@ int setup_fields(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables,
thd->allow_sum_func= allow_sum_func;
thd->where="field list";
- for (uint i= 0; (item= it++); i++)
+ Item **ref= ref_pointer_array;
+ while ((item= it++))
{
if (item->fix_fields(thd, tables, it.ref()) ||
item->check_cols(1))
DBUG_RETURN(-1); /* purecov: inspected */
- item= *(it.ref()); //Item can be chenged in fix fields
- if (ref_pointer_array)
- ref_pointer_array[i]= item;
+ item= *(it.ref()); //Item can be changed in fix fields
+ if (ref)
+ *(ref++)= item;
if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM &&
sum_func_list)
item->split_sum_func(ref_pointer_array, *sum_func_list);