~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/item_row.cc

Removed DBUG symbols and fixed TRUE/FALSE

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
void Item_row::illegal_method_call(const char *method __attribute__((__unused__)))
52
52
{
53
 
  DBUG_ENTER("Item_row::illegal_method_call");
54
 
  DBUG_PRINT("error", ("!!! %s method was called for row item", method));
55
 
  DBUG_ASSERT(0);
 
53
  assert(0);
56
54
  my_error(ER_OPERAND_COLUMNS, MYF(0), 1);
57
 
  DBUG_VOID_RETURN;
 
55
  return;
58
56
}
59
57
 
60
58
bool Item_row::fix_fields(THD *thd, Item **ref __attribute__((__unused__)))
61
59
{
62
 
  DBUG_ASSERT(fixed == 0);
 
60
  assert(fixed == 0);
63
61
  null_value= 0;
64
62
  maybe_null= 0;
65
63
  Item **arg, **arg_end;
66
64
  for (arg= items, arg_end= items+arg_count; arg != arg_end ; arg++)
67
65
  {
68
66
    if ((*arg)->fix_fields(thd, arg))
69
 
      return TRUE;
 
67
      return true;
70
68
    // we can't assign 'item' before, because fix_fields() can change arg
71
69
    Item *item= *arg;
72
70
    used_tables_cache |= item->used_tables();
85
83
    with_sum_func= with_sum_func || item->with_sum_func;
86
84
  }
87
85
  fixed= 1;
88
 
  return FALSE;
 
86
  return false;
89
87
}
90
88
 
91
89
 
92
90
void Item_row::cleanup()
93
91
{
94
 
  DBUG_ENTER("Item_row::cleanup");
95
 
 
96
92
  Item::cleanup();
97
93
  /* Reset to the original values */
98
94
  used_tables_cache= 0;
99
95
  const_item_cache= 1;
100
96
  with_null= 0;
101
97
 
102
 
  DBUG_VOID_RETURN;
 
98
  return;
103
99
}
104
100
 
105
101
 
108
104
{
109
105
  Item **arg, **arg_end;
110
106
  for (arg= items, arg_end= items+arg_count; arg != arg_end ; arg++)
111
 
    (*arg)->split_sum_func2(thd, ref_pointer_array, fields, arg, TRUE);
 
107
    (*arg)->split_sum_func2(thd, ref_pointer_array, fields, arg, true);
112
108
}
113
109
 
114
110