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

« back to all changes in this revision

Viewing changes to sql/sys_vars.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-10-22 15:14:10 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20131022151410-5xj09x9slxhqa0fx
Tags: 5.5.34-0ubuntu0.13.10.1
* SECURITY UPDATE: Update to 5.5.34 to fix security issues (LP: #1243253)
  - http://www.oracle.com/technetwork/topics/security/cpuoct2013-1899837.html
  - CVE-2013-3839
  - CVE-2013-5807

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
122
122
    option.u_max_value= (uchar**)max_var_ptr();
123
123
    if (max_var_ptr())
124
124
      *max_var_ptr()= max_val;
125
 
    global_var(T)= def_val;
 
125
 
 
126
    // Do not set global_var for Sys_var_keycache objects
 
127
    if (offset >= 0)
 
128
      global_var(T)= def_val;
 
129
 
126
130
    DBUG_ASSERT(size == sizeof(T));
127
131
    DBUG_ASSERT(min_val < max_val);
128
132
    DBUG_ASSERT(min_val <= def_val);
659
663
          on_check_function on_check_func,
660
664
          keycache_update_function on_update_func,
661
665
          const char *substitute=0)
662
 
    : Sys_var_ulonglong(name_arg, comment, flag_args, off, size,
663
 
              getopt, min_val, max_val, def_val,
664
 
              block_size, lock, binlog_status_arg, on_check_func, 0,
665
 
              substitute),
 
666
    : Sys_var_ulonglong(name_arg, comment, flag_args,
 
667
                        -1,     /* offset, see base class CTOR */
 
668
                        size,
 
669
                        getopt, min_val, max_val, def_val,
 
670
                        block_size, lock, binlog_status_arg, on_check_func, 0,
 
671
                        substitute),
666
672
    keycache_update(on_update_func)
667
673
  {
 
674
    offset= off; /* Remember offset in KEY_CACHE */
668
675
    option.var_type|= GET_ASK_ADDR;
669
676
    option.value= (uchar**)1; // crash me, please
670
677
    keycache_var(dflt_key_cache, off)= def_val;
729
736
          const char *substitute=0,
730
737
          int parse_flag= PARSE_NORMAL)
731
738
    : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
732
 
              getopt.arg_type, SHOW_DOUBLE, (longlong) double2ulonglong(def_val),
 
739
              getopt.arg_type, SHOW_DOUBLE,
 
740
              (longlong) getopt_double2ulonglong(def_val),
733
741
              lock, binlog_status_arg, on_check_func, on_update_func,
734
742
              substitute, parse_flag)
735
743
  {
736
744
    option.var_type= GET_DOUBLE;
737
 
    option.min_value= (longlong) double2ulonglong(min_val);
738
 
    option.max_value= (longlong) double2ulonglong(max_val);
 
745
    option.min_value= (longlong) getopt_double2ulonglong(min_val);
 
746
    option.max_value= (longlong) getopt_double2ulonglong(max_val);
739
747
    global_var(double)= (double)option.def_value;
740
748
    DBUG_ASSERT(min_val < max_val);
741
749
    DBUG_ASSERT(min_val <= def_val);
767
775
  void session_save_default(THD *thd, set_var *var)
768
776
  { var->save_result.double_value= global_var(double); }
769
777
  void global_save_default(THD *thd, set_var *var)
770
 
  { var->save_result.double_value= (double)option.def_value; }
 
778
  { var->save_result.double_value= getopt_ulonglong2double(option.def_value); }
771
779
};
772
780
 
773
781
/**