diff options
author | Marc Alff <marc.alff@sun.com> | 2010-01-06 22:42:07 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2010-01-06 22:42:07 -0700 |
commit | 3d915225611a921fad03934e58bf281b48fc15b0 (patch) | |
tree | ea8cbc9d70015a17aad75df30e7d223476eaa4da /sql/set_var.h | |
parent | 4b559b912f5a3aa02a226fdacddaa3b80a8ade42 (diff) | |
download | mariadb-git-3d915225611a921fad03934e58bf281b48fc15b0.tar.gz |
WL#2360 Performance schema
Part IV: sql instrumentation
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index d878e85cec0..4a212d3b685 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -1,6 +1,6 @@ #ifndef SET_VAR_INCLUDED #define SET_VAR_INCLUDED -/* Copyright 2000-2008 MySQL AB, 2009 Sun Microsystems, Inc. +/* Copyright (C) 2000-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. 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 @@ -56,6 +56,8 @@ public: 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; /** Enumeration type to indicate for a system variable whether it will be written to the binlog or not. @@ -68,6 +70,7 @@ 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 @@ -83,7 +86,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); + uint deprecated_version, const char *substitute, int parse_flag); /** The instance should only be destroyed on shutdown, as it doesn't unlink itself from the chain. @@ -122,8 +125,11 @@ public: } return true; // keep gcc happy } - bool register_option(DYNAMIC_ARRAY *array) - { return option.id != -1 && insert_dynamic(array, (uchar*)&option); } + bool register_option(DYNAMIC_ARRAY *array, int parse_flags) + { + return (option.id != -1) && (m_parse_flag & parse_flags) && + insert_dynamic(array, (uchar*)&option); + } private: virtual bool do_check(THD *thd, set_var *var) = 0; @@ -289,7 +295,8 @@ extern sys_var *Sys_autocommit_ptr; CHARSET_INFO *get_old_charset_by_name(const char *old_name); -int sys_var_init(DYNAMIC_ARRAY *long_options); +int sys_var_init(); +int sys_var_add_options(DYNAMIC_ARRAY *long_options, int parse_flags); void sys_var_end(void); #endif |