summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index 52679aa636c..d34b1db8b71 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -1,6 +1,6 @@
#ifndef SET_VAR_INCLUDED
#define SET_VAR_INCLUDED
-/* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 2010, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -59,9 +59,7 @@ public:
sys_var *next;
LEX_CSTRING name;
enum flag_enum { GLOBAL, SESSION, ONLY_SESSION, SCOPE_MASK=1023,
- READONLY=1024, ALLOCATED=2048 };
- static const int PARSE_EARLY= 1;
- static const int PARSE_NORMAL= 2;
+ READONLY=1024, ALLOCATED=2048, PARSE_EARLY=4096 };
/**
Enumeration type to indicate for a system variable whether
it will be written to the binlog or not.
@@ -74,7 +72,6 @@ protected:
typedef bool (*on_update_function)(sys_var *self, THD *thd, enum_var_type type);
int flags; ///< or'ed flag_enum values
- int m_parse_flag; ///< either PARSE_EARLY or PARSE_NORMAL.
const SHOW_TYPE show_val_type; ///< what value_ptr() returns for sql_show.cc
my_option option; ///< min, max, default values are stored here
PolyLock *guard; ///< *second* lock that protects the variable
@@ -90,7 +87,7 @@ public:
enum get_opt_arg_type getopt_arg_type, SHOW_TYPE show_val_type_arg,
longlong def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg,
on_check_function on_check_func, on_update_function on_update_func,
- uint deprecated_version, const char *substitute, int parse_flag);
+ uint deprecated_version, const char *substitute);
virtual ~sys_var() {}
@@ -133,7 +130,7 @@ public:
}
bool register_option(DYNAMIC_ARRAY *array, int parse_flags)
{
- return (option.id != -1) && (m_parse_flag & parse_flags) &&
+ return (option.id != -1) && ((flags & PARSE_EARLY) == parse_flags) &&
insert_dynamic(array, (uchar*)&option);
}
@@ -209,7 +206,7 @@ public:
plugin_ref plugin; ///< for Sys_var_plugin
Time_zone *time_zone; ///< for Sys_var_tz
LEX_STRING string_value; ///< for Sys_var_charptr and others
- void *ptr; ///< for Sys_var_struct
+ const void *ptr; ///< for Sys_var_struct
} save_result;
LEX_STRING base; /**< for structured variables, like keycache_name.variable_name */