diff options
author | unknown <jimw@mysql.com> | 2006-02-17 11:03:34 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2006-02-17 11:03:34 -0800 |
commit | bdf18f433188ccccec916f5c23abfbe7f2dd0bb1 (patch) | |
tree | 5823f1009fef763217e28e43e56976f3d23ab876 /sql/set_var.h | |
parent | 1b587ced223f6f4d2a7d683c3062d622019c9fb8 (diff) | |
parent | d68354d56703a236e20ea4af1d3a835aa39f1941 (diff) | |
download | mariadb-git-bdf18f433188ccccec916f5c23abfbe7f2dd0bb1.tar.gz |
Merge mysql.com:/home/jimw/my/mysql-5.0-7955
into mysql.com:/home/jimw/my/mysql-5.1-clean
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/bdb.result:
Resolve conflict
mysql-test/t/bdb.test:
Resolve conflict
sql/share/errmsg.txt:
Resolve conflict
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index 75c36176f91..0961f6d4325 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -334,19 +334,31 @@ class sys_var_thd_enum :public sys_var_thd protected: ulong SV::*offset; TYPELIB *enum_names; + sys_check_func check_func; public: sys_var_thd_enum(const char *name_arg, ulong SV::*offset_arg, TYPELIB *typelib) - :sys_var_thd(name_arg), offset(offset_arg), enum_names(typelib) + :sys_var_thd(name_arg), offset(offset_arg), enum_names(typelib), + check_func(0) {} sys_var_thd_enum(const char *name_arg, ulong SV::*offset_arg, TYPELIB *typelib, sys_after_update_func func) - :sys_var_thd(name_arg,func), offset(offset_arg), enum_names(typelib) + :sys_var_thd(name_arg,func), offset(offset_arg), enum_names(typelib), + check_func(0) + {} + sys_var_thd_enum(const char *name_arg, ulong SV::*offset_arg, + TYPELIB *typelib, sys_after_update_func func, + sys_check_func check) + :sys_var_thd(name_arg,func), offset(offset_arg), enum_names(typelib), + check_func(check) {} bool check(THD *thd, set_var *var) { - return check_enum(thd, var, enum_names); + int ret= 0; + if (check_func) + ret= (*check_func)(thd, var); + return ret ? ret : check_enum(thd, var, enum_names); } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); |