diff options
author | unknown <monty@mysql.com/narttu.mysql.fi> | 2007-02-21 14:07:08 +0200 |
---|---|---|
committer | unknown <monty@mysql.com/narttu.mysql.fi> | 2007-02-21 14:07:08 +0200 |
commit | 1384e640053aee1f528148e876a632b2a0a2a8ed (patch) | |
tree | 57fb0c9c6c3686011b021c42671cf5065cdc0cf6 /sql/set_var.h | |
parent | c5beed03464e9b74d75a701721154d68fc4f84ea (diff) | |
parent | 2f3a17b63e4e207ae8796d953ba611a593e3ee2c (diff) | |
download | mariadb-git-1384e640053aee1f528148e876a632b2a0a2a8ed.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
BitKeeper/etc/ignore:
auto-union
BUILD/SETUP.sh:
Auto merged
Makefile.am:
Auto merged
client/mysql.cc:
Auto merged
cmd-line-utils/readline/display.c:
Auto merged
configure.in:
Auto merged
extra/yassl/include/buffer.hpp:
Auto merged
extra/yassl/include/crypto_wrapper.hpp:
Auto merged
extra/yassl/include/yassl_imp.hpp:
Auto merged
extra/yassl/include/yassl_int.hpp:
Auto merged
extra/yassl/src/crypto_wrapper.cpp:
Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
Auto merged
extra/yassl/taocrypt/include/des.hpp:
Auto merged
extra/yassl/taocrypt/include/hash.hpp:
Auto merged
extra/yassl/taocrypt/include/hmac.hpp:
Auto merged
extra/yassl/taocrypt/include/modarith.hpp:
Auto merged
extra/yassl/taocrypt/include/modes.hpp:
Auto merged
extra/yassl/taocrypt/include/rsa.hpp:
Auto merged
extra/yassl/taocrypt/include/type_traits.hpp:
Auto merged
extra/yassl/taocrypt/mySTL/list.hpp:
Auto merged
extra/yassl/taocrypt/src/aes.cpp:
Auto merged
extra/yassl/taocrypt/src/algebra.cpp:
Auto merged
extra/yassl/testsuite/testsuite.cpp:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
myisam/mi_open.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysys/default.c:
Auto merged
ndb/src/common/transporter/Transporter.cpp:
Auto merged
ndb/src/common/util/File.cpp:
Auto merged
ndb/src/common/util/SocketClient.cpp:
Auto merged
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
Auto merged
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
Auto merged
ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
Auto merged
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
Auto merged
ndb/src/mgmapi/mgmapi.cpp:
Auto merged
ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
Auto merged
ndb/src/ndbapi/ClusterMgr.hpp:
Auto merged
ndb/src/ndbapi/Ndb.cpp:
Auto merged
ndb/src/ndbapi/NdbScanOperation.cpp:
Auto merged
ndb/src/ndbapi/SignalSender.cpp:
Auto merged
sql/field.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/unireg.cc:
Auto merged
extra/yassl/taocrypt/src/asn.cpp:
Manual merge (Fix shadowed variable name)
extra/yassl/taocrypt/test/test.cpp:
No changes
ndb/src/common/util/ConfigValues.cpp:
Manual merge (Fix shadowed variable name)
sql/field.h:
manual merge
sql/ha_myisam.cc:
manual merge
sql/ha_ndbcluster.cc:
manual merge
sql/item_cmpfunc.cc:
manual merge
sql/item_subselect.cc:
Manual merge (Fix shadowed variable name)
sql/mysqld.cc:
no changes
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 82 |
1 files changed, 42 insertions, 40 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index 60fdb0e879b..6000e155db9 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -55,8 +55,8 @@ public: bool check_enum(THD *thd, set_var *var, TYPELIB *enum_names); bool check_set(THD *thd, set_var *var, TYPELIB *enum_names); virtual bool update(THD *thd, set_var *var)=0; - virtual void set_default(THD *thd, enum_var_type type) {} - virtual SHOW_TYPE type() { return SHOW_UNDEF; } + virtual void set_default(THD *thd_arg, enum_var_type type) {} + virtual SHOW_TYPE show_type() { return SHOW_UNDEF; } virtual byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { return 0; } virtual bool check_type(enum_var_type type) @@ -96,14 +96,16 @@ class sys_var_long_ptr_global: public sys_var_global { public: ulong *value; - sys_var_long_ptr_global(const char *name_arg, ulong *value_ptr, + sys_var_long_ptr_global(const char *name_arg, ulong *value_ptr_arg, pthread_mutex_t *guard_arg, sys_after_update_func after_update_arg= NULL) - :sys_var_global(name_arg, after_update_arg, guard_arg), value(value_ptr) {} + :sys_var_global(name_arg, after_update_arg, guard_arg), + value(value_ptr_arg) + {} bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_LONG; } + SHOW_TYPE show_type() { return SHOW_LONG; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { return (byte*) value; } }; @@ -125,14 +127,14 @@ class sys_var_ulonglong_ptr :public sys_var { public: ulonglong *value; - sys_var_ulonglong_ptr(const char *name_arg, ulonglong *value_ptr) - :sys_var(name_arg),value(value_ptr) {} - sys_var_ulonglong_ptr(const char *name_arg, ulonglong *value_ptr, + sys_var_ulonglong_ptr(const char *name_arg, ulonglong *value_ptr_arg) + :sys_var(name_arg),value(value_ptr_arg) {} + sys_var_ulonglong_ptr(const char *name_arg, ulonglong *value_ptr_arg, sys_after_update_func func) - :sys_var(name_arg,func), value(value_ptr) {} + :sys_var(name_arg,func), value(value_ptr_arg) {} bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_LONGLONG; } + SHOW_TYPE show_type() { return SHOW_LONGLONG; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { return (byte*) value; } }; @@ -151,7 +153,7 @@ public: } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_MY_BOOL; } + SHOW_TYPE show_type() { return SHOW_MY_BOOL; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { return (byte*) value; } bool check_update_type(Item_result type) { return 0; } @@ -183,7 +185,7 @@ public: { (*set_default_func)(thd, type); } - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { return (byte*) value; } bool check_update_type(Item_result type) @@ -209,7 +211,7 @@ public: { return 1; } - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { return (byte*) value; @@ -238,7 +240,7 @@ public: { return 1; } - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { return (byte*) *value; @@ -266,7 +268,7 @@ public: return check_enum(thd, var, enum_names); } bool update(THD *thd, set_var *var); - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); bool check_update_type(Item_result type) { return 0; } }; @@ -301,7 +303,7 @@ public: bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_LONG; } + SHOW_TYPE show_type() { return SHOW_LONG; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); }; @@ -319,7 +321,7 @@ public: {} bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_HA_ROWS; } + SHOW_TYPE show_type() { return SHOW_HA_ROWS; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); }; @@ -339,7 +341,7 @@ public: {} bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_LONGLONG; } + SHOW_TYPE show_type() { return SHOW_LONGLONG; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); bool check_default(enum_var_type type) { @@ -365,7 +367,7 @@ public: {} bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_MY_BOOL; } + SHOW_TYPE show_type() { return SHOW_MY_BOOL; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); bool check(THD *thd, set_var *var) { @@ -396,7 +398,7 @@ public: } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); bool check_update_type(Item_result type) { return 0; } }; @@ -431,7 +433,7 @@ public: :sys_var_thd(name_arg), offset(offset_arg) {} bool check(THD *thd, set_var *var); -SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) { return type != STRING_RESULT; /* Only accept strings */ @@ -469,7 +471,7 @@ public: bool update(THD *thd, set_var *var); bool check_update_type(Item_result type) { return 0; } bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } - SHOW_TYPE type() { return SHOW_MY_BOOL; } + SHOW_TYPE show_type() { return SHOW_MY_BOOL; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); }; @@ -484,7 +486,7 @@ public: void set_default(THD *thd, enum_var_type type); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } bool check_default(enum_var_type type) { return 0; } - SHOW_TYPE type() { return SHOW_LONG; } + SHOW_TYPE show_type() { return SHOW_LONG; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); }; @@ -495,7 +497,7 @@ public: sys_var_last_insert_id(const char *name_arg) :sys_var(name_arg) {} bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } - SHOW_TYPE type() { return SHOW_LONGLONG; } + SHOW_TYPE show_type() { return SHOW_LONGLONG; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); }; @@ -506,7 +508,7 @@ public: sys_var_insert_id(const char *name_arg) :sys_var(name_arg) {} bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } - SHOW_TYPE type() { return SHOW_LONGLONG; } + SHOW_TYPE show_type() { return SHOW_LONGLONG; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); }; @@ -528,8 +530,8 @@ public: class sys_var_sync_binlog_period :public sys_var_long_ptr { public: - sys_var_sync_binlog_period(const char *name_arg, ulong *value_ptr) - :sys_var_long_ptr(name_arg,value_ptr) {} + sys_var_sync_binlog_period(const char *name_arg, ulong *value_ptr_arg) + :sys_var_long_ptr(name_arg,value_ptr_arg) {} bool update(THD *thd, set_var *var); }; #endif @@ -559,7 +561,7 @@ public: no_support_one_shot= 0; } bool check(THD *thd, set_var *var); -SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) { return ((type != STRING_RESULT) && (type != INT_RESULT)); @@ -583,7 +585,7 @@ public: no_support_one_shot= 0; } bool check(THD *thd, set_var *var); - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) { return ((type != STRING_RESULT) && (type != INT_RESULT)); @@ -699,7 +701,7 @@ public: :sys_var_key_cache_param(name_arg, offsetof(KEY_CACHE, param_buff_size)) {} bool update(THD *thd, set_var *var); - SHOW_TYPE type() { return SHOW_LONGLONG; } + SHOW_TYPE show_type() { return SHOW_LONGLONG; } }; @@ -710,7 +712,7 @@ public: :sys_var_key_cache_param(name_arg, offset_arg) {} bool update(THD *thd, set_var *var); - SHOW_TYPE type() { return SHOW_LONG; } + SHOW_TYPE show_type() { return SHOW_LONG; } }; @@ -725,7 +727,7 @@ public: :sys_var_thd(name_arg), offset(offset_arg), date_time_type(date_time_type_arg) {} - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) { return type != STRING_RESULT; /* Only accept strings */ @@ -745,13 +747,13 @@ class sys_var_readonly: public sys_var { public: enum_var_type var_type; - SHOW_TYPE show_type; + SHOW_TYPE show_type_value; sys_value_ptr_func value_ptr_func; sys_var_readonly(const char *name_arg, enum_var_type type, SHOW_TYPE show_type_arg, sys_value_ptr_func value_ptr_func_arg) :sys_var(name_arg), var_type(type), - show_type(show_type_arg), value_ptr_func(value_ptr_func_arg) + show_type_value(show_type_arg), value_ptr_func(value_ptr_func_arg) {} bool update(THD *thd, set_var *var) { return 1; } bool check_default(enum_var_type type) { return 1; } @@ -761,7 +763,7 @@ public: { return (*value_ptr_func)(thd); } - SHOW_TYPE type() { return show_type; } + SHOW_TYPE show_type() { return show_type_value; } bool is_readonly() const { return 1; } }; @@ -774,7 +776,7 @@ public: no_support_one_shot= 0; } bool check(THD *thd, set_var *var); - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) { return type != STRING_RESULT; /* Only accept strings */ @@ -798,7 +800,7 @@ public: return type != OPT_GLOBAL || !option_limits; } void set_default(THD *thd, enum_var_type type); - SHOW_TYPE type() { return SHOW_INT; } + SHOW_TYPE show_type() { return SHOW_INT; } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); }; @@ -825,7 +827,7 @@ public: #endif } bool check(THD *thd, set_var *var); - SHOW_TYPE type() { return SHOW_CHAR; } + SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) { return ((type != STRING_RESULT) && (type != INT_RESULT)); @@ -872,8 +874,8 @@ public: } save_result; LEX_STRING base; /* for structs */ - set_var(enum_var_type type_arg, sys_var *var_arg, const LEX_STRING *base_name_arg, - Item *value_arg) + set_var(enum_var_type type_arg, sys_var *var_arg, + const LEX_STRING *base_name_arg, Item *value_arg) :var(var_arg), type(type_arg), base(*base_name_arg) { /* |