~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to sql/set_var.cc

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
4239
4239
 
4240
4240
bool sys_var_thd_dbug::update(THD *thd, set_var *var)
4241
4241
{
 
4242
  char buf[256];
 
4243
  String str(buf, sizeof(buf), system_charset_info), *res;
 
4244
 
 
4245
  res= var->value->val_str(&str);
 
4246
 
4242
4247
  if (var->type == OPT_GLOBAL)
4243
 
    DBUG_SET_INITIAL(var ? var->value->str_value.c_ptr() : "");
 
4248
    DBUG_SET_INITIAL(res ? res->c_ptr() : "");
4244
4249
  else
4245
 
    DBUG_SET(var ? var->value->str_value.c_ptr() : "");
 
4250
    DBUG_SET(res ? res->c_ptr() : "");
4246
4251
 
4247
4252
  return 0;
4248
4253
}