~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sys_var.cc

  • Committer: Monty Taylor
  • Date: 2010-11-18 03:22:35 UTC
  • mto: This revision was merged to the branch mainline in revision 1946.
  • Revision ID: mordred@inaugust.com-20101118032235-qwxm34ayl6j10drq
Add better support in constrained_check for min/max support. Add string ref class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
338
338
  return res;
339
339
}
340
340
 
 
341
bool sys_var_std_string::check(Session *session, set_var *var)
 
342
{
 
343
  if (check_func == NULL)
 
344
  {
 
345
    return false;
 
346
  }
 
347
 
 
348
  int res= (*check_func)(session, var);
 
349
  if (res != 0)
 
350
  {
 
351
    my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), getName().c_str(), var->value->str_value.ptr());
 
352
    return true;
 
353
  }
 
354
  return false;
 
355
}
 
356
 
341
357
/*
342
358
  Functions to check and update variables
343
359
*/