summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2004-08-20 16:32:40 -0700
committerunknown <igor@rurik.mysql.com>2004-08-20 16:32:40 -0700
commit7c46252467101d841de5b7774b4f5b6ddf858d9f (patch)
treef06700cf3a42691a32a4aaadb4f2b67f2f9872a6 /sql/item_sum.cc
parent6bccd36664c09c094bf3281ccdeaf7e8b249f8ef (diff)
parent282ec5bd28ba5739f1fe5754e9031646138f3acf (diff)
downloadmariadb-git-7c46252467101d841de5b7774b4f5b6ddf858d9f.tar.gz
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1 sql/item_sum.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 8e869f5492b..3aacf7605c6 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -64,28 +64,28 @@ Item_sum::Item_sum(THD *thd, Item_sum *item):
/*
- Save copy of arguments if we are prepare prepared statement
+ Save copy of arguments if we prepare prepared statement
(arguments can be rewritten in get_tmp_table_item())
SYNOPSIS
- Item_sum::save_args_for_prepared_statements()
+ Item_sum::save_args_for_prepared_statement()
thd - thread handler
RETURN
0 - OK
1 - Error
*/
-bool Item_sum::save_args_for_prepared_statements(THD *thd)
+bool Item_sum::save_args_for_prepared_statement(THD *thd)
{
- if (thd->current_statement)
- return save_args(thd->current_statement);
+ if (thd->current_arena->is_stmt_prepare())
+ return save_args(thd->current_arena);
return 0;
}
-bool Item_sum::save_args(Statement* stmt)
+bool Item_sum::save_args(Item_arena* arena)
{
- if (!(args_copy= (Item**) stmt->alloc(sizeof(Item*)*arg_count)))
+ if (!(args_copy= (Item**) arena->alloc(sizeof(Item*)*arg_count)))
return 1;
memcpy(args_copy, args, sizeof(Item*)*arg_count);
return 0;
@@ -217,7 +217,7 @@ Item_sum_num::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
{
DBUG_ASSERT(fixed == 0);
- if (save_args_for_prepared_statements(thd))
+ if (save_args_for_prepared_statement(thd))
return 1;
if (!thd->allow_sum_func)
@@ -251,7 +251,7 @@ Item_sum_hybrid::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
{
DBUG_ASSERT(fixed == 0);
- if (save_args_for_prepared_statements(thd))
+ if (save_args_for_prepared_statement(thd))
return 1;
Item *item= args[0];
@@ -1950,7 +1950,7 @@ Item_func_group_concat::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
{
DBUG_ASSERT(fixed == 0);
- if (save_args_for_prepared_statements(thd))
+ if (save_args_for_prepared_statement(thd))
return 1;
uint i; /* for loop variable */