~ubuntu-branches/ubuntu/utopic/mysql-5.5/utopic-security

« back to all changes in this revision

Viewing changes to sql/set_var.cc

  • Committer: Package Import Robot
  • Author(s): Seth Arnold
  • Date: 2013-04-18 18:25:54 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20130418182554-pflh0bjoc611yqxw
Tags: 5.5.31-0ubuntu0.13.04.1
* SECURITY UPDATE: Update to 5.5.31 to fix security issues (LP: #1170516)
  - http://www.oracle.com/technetwork/topics/security/cpuapr2013-1899555.html
* debian/patches/71_disable_rpl_tests.patch: refreshed.
* debian/patches/fix-mysqldump-test.patch: removed, fixed differently
  upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
 
1
/* Copyright (c) 2002, 2013 Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
   This program is free software; you can redistribute it and/or modify
4
4
   it under the terms of the GNU General Public License as published by
256
256
    return session_value_ptr(thd, base);
257
257
}
258
258
 
259
 
bool sys_var::set_default(THD *thd, enum_var_type type)
 
259
bool sys_var::set_default(THD *thd, set_var* var)
260
260
{
261
 
  LEX_STRING empty={0,0};
262
 
  set_var var(type, 0, &empty, 0);
263
 
 
264
 
  if (type == OPT_GLOBAL || scope() == GLOBAL)
265
 
    global_save_default(thd, &var);
 
261
  if (var->type == OPT_GLOBAL || scope() == GLOBAL)
 
262
    global_save_default(thd, var);
266
263
  else
267
 
    session_save_default(thd, &var);
 
264
    session_save_default(thd, var);
268
265
 
269
 
  return check(thd, &var) || update(thd, &var);
 
266
  return check(thd, var) || update(thd, var);
270
267
}
271
268
 
272
269
void sys_var::do_deprecated_warning(THD *thd)
668
665
*/
669
666
int set_var::update(THD *thd)
670
667
{
671
 
  return value ? var->update(thd, this) : var->set_default(thd, type);
 
668
  return value ? var->update(thd, this) : var->set_default(thd, this);
672
669
}
673
670
 
674
671