~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/set_var.cc

  • Committer: Mark Atwood
  • Date: 2011-06-25 15:38:53 UTC
  • mfrom: (2318.6.78 refactor16)
  • Revision ID: me@mark.atwood.name-20110625153853-za5fjiwd3z0aykdd
mergeĀ lp:~olafvdspek/drizzle/refactor16

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
  if (value_arg && value_arg->type() == Item::FIELD_ITEM)
95
95
  {
96
96
    Item_field *item= (Item_field*) value_arg;
97
 
    if (!(value=new Item_string(item->field_name,
98
 
                                (uint32_t) strlen(item->field_name),
99
 
                                item->collation.collation)))
100
 
      value=value_arg;                  /* Give error message later */
 
97
    value=new Item_string(item->field_name, (uint32_t) strlen(item->field_name), item->collation.collation);
101
98
  }
102
99
  else
103
100
  {
119
116
    return -1;
120
117
  }
121
118
  /* value is a NULL pointer if we are using SET ... = DEFAULT */
122
 
  if (!value)
 
119
  if (not value)
123
120
  {
124
121
    if (var->check_default(type))
125
122
    {
156
153
{
157
154
  try
158
155
  {
159
 
    if (! value)
 
156
    if (not value)
160
157
      var->set_default(session, type);
161
158
    else if (var->update(session, this))
162
159
      return -1;                                // should never happen