~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/set_var.cc

  • Committer: Monty Taylor
  • Date: 2011-01-11 03:35:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2074.
  • Revision ID: mordred@inaugust.com-20110111033519-x141bdubt09jy0py
First step in getting that anonymous union out of set_var.

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
                          new_val.c_str(),
192
192
                          explanation.c_str());
193
193
    }
 
194
    else if (boost::get_error_info<invalid_value>(ex) != NULL)
 
195
    {
 
196
      const std::string str_val= *(boost::get_error_info<invalid_value>(ex));
 
197
      string explanation("(");
 
198
      explanation.append(str_val);
 
199
      explanation.push_back(')');
 
200
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
 
201
                          ER_INVALID_OPTION_VALUE,
 
202
                          ER(ER_INVALID_OPTION_VALUE),
 
203
                          var->getName().c_str(),
 
204
                          new_val.c_str(),
 
205
                          explanation.c_str());
 
206
    }
194
207
    else
195
208
    {
196
209
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
230
243
  return 0;
231
244
}
232
245
 
 
246
void set_var::setValue(const std::string &new_value)
 
247
{
 
248
  str_value= new_value;
 
249
}
 
250
 
 
251
void set_var::setValue(uint64_t new_value)
 
252
{
 
253
  save_result.uint64_t_value= new_value;
 
254
}
 
255
 
 
256
void set_var::updateValue()
 
257
{
 
258
  save_result.uint64_t_value= value->val_int();
 
259
}
 
260
 
 
261
 
233
262
} /* namespace drizzled */