summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-02-07 15:47:24 +0200
committermonty@mashka.mysql.fi <>2003-02-07 15:47:24 +0200
commit25de9c19b2b76ff56bfa69b99033b14262f974ff (patch)
tree0661c54a51aa711947173e8a8e27e2e46cfa971c /sql/item_strfunc.cc
parent023d6dd39b9068ab8096c5ec60ab82bd10dbcee2 (diff)
downloadmariadb-git-25de9c19b2b76ff56bfa69b99033b14262f974ff.tar.gz
After merge fixes & remove compiler warnings
Added lengths for all MYSQL_FIELD string parameters Changed field length to 2 byte in .frm files
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc39
1 files changed, 24 insertions, 15 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 037bb60de3d..d5d8e6eeb1d 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -597,16 +597,19 @@ null:
return 0;
}
-void Item_func_concat_ws::split_sum_func(List<Item> &fields)
+void Item_func_concat_ws::split_sum_func(Item **ref_pointer_array,
+ List<Item> &fields)
{
if (separator->with_sum_func && separator->type() != SUM_FUNC_ITEM)
- separator->split_sum_func(fields);
+ separator->split_sum_func(ref_pointer_array, fields);
else if (separator->used_tables() || separator->type() == SUM_FUNC_ITEM)
{
+ uint el= fields.elements;
fields.push_front(separator);
- separator= new Item_ref((Item**) fields.head_ref(), 0, separator->name);
- }
- Item_str_func::split_sum_func(fields);
+ ref_pointer_array[el]= separator;
+ separator= new Item_ref(ref_pointer_array + el, 0, separator->name);
+ }
+ Item_str_func::split_sum_func(ref_pointer_array, fields);
}
void Item_func_concat_ws::fix_length_and_dec()
@@ -1583,16 +1586,19 @@ void Item_func_elt::fix_length_and_dec()
}
-void Item_func_elt::split_sum_func(List<Item> &fields)
+void Item_func_elt::split_sum_func(Item **ref_pointer_array,
+ List<Item> &fields)
{
if (item->with_sum_func && item->type() != SUM_FUNC_ITEM)
- item->split_sum_func(fields);
+ item->split_sum_func(ref_pointer_array, fields);
else if (item->used_tables() || item->type() == SUM_FUNC_ITEM)
{
+ uint el= fields.elements;
fields.push_front(item);
- item= new Item_ref((Item**) fields.head_ref(), 0, item->name);
- }
- Item_str_func::split_sum_func(fields);
+ ref_pointer_array[el]= item;
+ item= new Item_ref(ref_pointer_array + el, 0, item->name);
+ }
+ Item_str_func::split_sum_func(ref_pointer_array, fields);
}
@@ -1642,16 +1648,19 @@ String *Item_func_elt::val_str(String *str)
}
-void Item_func_make_set::split_sum_func(List<Item> &fields)
+void Item_func_make_set::split_sum_func(Item **ref_pointer_array,
+ List<Item> &fields)
{
if (item->with_sum_func && item->type() != SUM_FUNC_ITEM)
- item->split_sum_func(fields);
+ item->split_sum_func(ref_pointer_array, fields);
else if (item->used_tables() || item->type() == SUM_FUNC_ITEM)
{
+ uint el= fields.elements;
fields.push_front(item);
- item= new Item_ref((Item**) fields.head_ref(), 0, item->name);
- }
- Item_str_func::split_sum_func(fields);
+ ref_pointer_array[el]= item;
+ item= new Item_ref(ref_pointer_array + el, 0, item->name);
+ }
+ Item_str_func::split_sum_func(ref_pointer_array, fields);
}