~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/sum.cc

  • Committer: Stewart Smith
  • Author(s): Georgi Kodinov, Stewart Smith
  • Date: 2010-12-02 08:22:34 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1971.
  • Revision ID: stewart@flamingspork.com-20101202082234-pkwt9mgatumswhcb
Merge Revision revid:georgi.kodinov@oracle.com-20100813080739-27p9rgxvo26a6psh from MySQL InnoDB

Original revid:georgi.kodinov@oracle.com-20100813080739-27p9rgxvo26a6psh

Original Authors: Georgi Kodinov <Georgi.Kodinov@Oracle.com>
Original commit message:
Bug #55580 : segfault in read_view_sees_trx_id

The server was not checking for errors generated during
the execution of Item::val_xxx() methods when copying
data to the group, order, or distinct temp table's row.
Fixed by extending the copy_funcs() to return an error
code and by checking for that error code on the places
copy_funcs() is called. 
Test case added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2714
2714
  if (always_null)
2715
2715
    return 0;
2716
2716
  copy_fields(tmp_table_param);
2717
 
  copy_funcs(tmp_table_param->items_to_copy);
 
2717
  if (copy_funcs(tmp_table_param->items_to_copy, table->in_use))
 
2718
    return true;
2718
2719
 
2719
2720
  for (Field **field= table->getFields() ; *field ; field++)
2720
2721
  {
3109
3110
  if (always_null)
3110
3111
    return 0;
3111
3112
  copy_fields(tmp_table_param);
3112
 
  copy_funcs(tmp_table_param->items_to_copy);
 
3113
  if (copy_funcs(tmp_table_param->items_to_copy, table->in_use))
 
3114
    return true;
3113
3115
 
3114
3116
  for (uint32_t i= 0; i < arg_count_field; i++)
3115
3117
  {