~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:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include <drizzled/server_includes.h>
 
16
#include "mysql_priv.h"
17
17
 
18
18
/**
19
19
  Row items used for comparing rows and IN operations on rows:
39
39
  else
40
40
    items= 0;
41
41
  List_iterator<Item> li(arg);
42
 
  uint32_t i= 0;
 
42
  uint i= 0;
43
43
  Item *item;
44
44
  while ((item= li++))
45
45
  {
48
48
  }
49
49
}
50
50
 
51
 
void Item_row::illegal_method_call(const char *method __attribute__((unused)))
 
51
void Item_row::illegal_method_call(const char *method __attribute__((__unused__)))
52
52
{
53
53
  assert(0);
54
54
  my_error(ER_OPERAND_COLUMNS, MYF(0), 1);
55
55
  return;
56
56
}
57
57
 
58
 
bool Item_row::fix_fields(THD *thd, Item **ref __attribute__((unused)))
 
58
bool Item_row::fix_fields(THD *thd, Item **ref __attribute__((__unused__)))
59
59
{
60
60
  assert(fixed == 0);
61
61
  null_value= 0;
112
112
{
113
113
  used_tables_cache= 0;
114
114
  const_item_cache= 1;
115
 
  for (uint32_t i= 0; i < arg_count; i++)
 
115
  for (uint i= 0; i < arg_count; i++)
116
116
  {
117
117
    items[i]->update_used_tables();
118
118
    used_tables_cache|= items[i]->used_tables();
121
121
}
122
122
 
123
123
void Item_row::fix_after_pullout(st_select_lex *new_parent,
124
 
                                 Item **ref __attribute__((unused)))
 
124
                                 Item **ref __attribute__((__unused__)))
125
125
{
126
126
  used_tables_cache= 0;
127
127
  const_item_cache= 1;
128
 
  for (uint32_t i= 0; i < arg_count; i++)
 
128
  for (uint i= 0; i < arg_count; i++)
129
129
  {
130
130
    items[i]->fix_after_pullout(new_parent, &items[i]);
131
131
    used_tables_cache|= items[i]->used_tables();
133
133
  }
134
134
}
135
135
 
136
 
bool Item_row::check_cols(uint32_t c)
 
136
bool Item_row::check_cols(uint c)
137
137
{
138
138
  if (c != arg_count)
139
139
  {
146
146
void Item_row::print(String *str, enum_query_type query_type)
147
147
{
148
148
  str->append('(');
149
 
  for (uint32_t i= 0; i < arg_count; i++)
 
149
  for (uint i= 0; i < arg_count; i++)
150
150
  {
151
151
    if (i)
152
152
      str->append(',');
156
156
}
157
157
 
158
158
 
159
 
bool Item_row::walk(Item_processor processor, bool walk_subquery, unsigned char *arg)
 
159
bool Item_row::walk(Item_processor processor, bool walk_subquery, uchar *arg)
160
160
{
161
 
  for (uint32_t i= 0; i < arg_count; i++)
 
161
  for (uint i= 0; i < arg_count; i++)
162
162
  {
163
163
    if (items[i]->walk(processor, walk_subquery, arg))
164
164
      return 1;
167
167
}
168
168
 
169
169
 
170
 
Item *Item_row::transform(Item_transformer transformer, unsigned char *arg)
 
170
Item *Item_row::transform(Item_transformer transformer, uchar *arg)
171
171
{
172
 
  for (uint32_t i= 0; i < arg_count; i++)
 
172
  for (uint i= 0; i < arg_count; i++)
173
173
  {
174
174
    Item *new_item= items[i]->transform(transformer, arg);
175
175
    if (!new_item)
189
189
 
190
190
void Item_row::bring_value()
191
191
{
192
 
  for (uint32_t i= 0; i < arg_count; i++)
 
192
  for (uint i= 0; i < arg_count; i++)
193
193
    items[i]->bring_value();
194
194
}