diff options
author | unknown <monty@mysql.com> | 2005-03-21 23:46:11 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-03-21 23:46:11 +0200 |
commit | 61f1e9a3e4257df5849723c7c0a68f537db25f75 (patch) | |
tree | 577397cc3f61f408845744ee2b839dd184070121 /sql/item_sum.cc | |
parent | 87110734d334b89f95323980f080b265e38810bf (diff) | |
parent | 802c41e04d0b4bb193abfff1b7084d3a6c971df6 (diff) | |
download | mariadb-git-61f1e9a3e4257df5849723c7c0a68f537db25f75.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
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.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 02b894e58bc..49f32cb0245 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -2667,11 +2667,11 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)), TABLE *table= item->table; char *record= (char*) table->record[0] + table->s->null_bytes; String tmp(table->record[1], table->s->reclength, default_charset_info), tmp2; - String &result= item->result; + String *result= &item->result; Item **arg= item->args, **arg_end= item->args + item->arg_count_field; - if (result.length()) - result.append(*item->separator); + if (result->length()) + result->append(*item->separator); tmp.length(0); @@ -2698,14 +2698,14 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)), else res= (*arg)->val_str(&tmp); if (res) - result.append(*res); + result->append(*res); } /* stop if length of result more than max_length */ - if (result.length() > item->max_length) + if (result->length() > item->max_length) { item->count_cut_values++; - result.length(item->max_length); + result->length(item->max_length); item->warning_for_row= TRUE; return 1; } @@ -2906,8 +2906,6 @@ Item_func_group_concat::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) MYF(0)); return TRUE; } - if (!args) /* allocation in constructor may fail */ - return TRUE; thd->allow_sum_func= 0; maybe_null= 0; @@ -2968,12 +2966,10 @@ bool Item_func_group_concat::setup(THD *thd) if (item->null_value) { always_null= 1; - break; + DBUG_RETURN(FALSE); } } } - if (always_null) - DBUG_RETURN(FALSE); List<Item> all_fields(list); /* |