~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/set_user_var.cc

Merge of Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/field/num.h>
25
25
#include <drizzled/session.h>
26
26
 
27
 
#include <bitset>
28
 
 
29
 
using namespace std;
30
 
 
31
27
/*
32
28
  When a user variable is updated (in a SET command or a query like
33
29
  SELECT @a:= ).
92
88
  {
93
89
    Table *table= (Table *) arg;
94
90
    if (result_field->table == table || !table)
95
 
      result_field->table->read_set->set(result_field->field_index);
96
 
  }
97
 
  return 0;
98
 
}
99
 
 
100
 
/*
101
 
  Mark field in bitmap supplied as *arg
102
 
 
103
 
*/
104
 
 
105
 
bool Item_func_set_user_var::register_field_in_bitmap(unsigned char *arg)
106
 
{
107
 
  bitset<MAX_FIELDS> *bitmap = (bitset<MAX_FIELDS> *) arg;
108
 
  assert(bitmap);
109
 
  if (result_field)
110
 
  {
111
 
    bitmap->set(result_field->field_index);
112
 
  }
113
 
  return 0;
114
 
}
 
91
      result_field->table->setReadSet(result_field->field_index);
 
92
  }
 
93
  return 0;
 
94
}
 
95
 
115
96
 
116
97
bool
117
98
Item_func_set_user_var::update_hash(void *ptr, uint32_t length,