summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2008-05-20 11:38:17 +0400
committerunknown <kostja@bodhi.(none)>2008-05-20 11:38:17 +0400
commit4175806efca7644c41ab77e5a8f07d1cc5a1ac00 (patch)
treec2c65314fdd8ac05f82de10701ce5eb6a9856e11 /sql/set_var.h
parent41116166257e92df96c394035c8b580e48626b00 (diff)
parent4b13b5cb34de81942d52173663031fb119d5b8e1 (diff)
downloadmariadb-git-4175806efca7644c41ab77e5a8f07d1cc5a1ac00.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.(none):/opt/local/work/mysql-5.1-27430 Makefile.am: Auto merged include/my_global.h: Auto merged mysql-test/include/mix1.inc: Auto merged sql/item.cc: Auto merged sql/my_decimal.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/sp.cc: Auto merged sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged sql/share/errmsg.txt: Auto merged sql/sql_yacc.yy: Auto merged libmysqld/CMakeLists.txt: Manual merge. libmysqld/lib_sql.cc: Manual merge. mysql-test/t/disabled.def: Manual merge.
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index 290d1bf0eb1..603c3114d0e 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -74,7 +74,8 @@ public:
sys_var(const char *name_arg, sys_after_update_func func= NULL,
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG)
:name(name_arg), after_update(func), no_support_one_shot(1),
- binlog_status(binlog_status_arg)
+ binlog_status(binlog_status_arg),
+ m_allow_empty_value(TRUE)
{}
virtual ~sys_var() {}
void chain_sys_var(sys_var_chain *chain_arg)
@@ -109,8 +110,16 @@ public:
virtual bool is_readonly() const { return 0; }
virtual sys_var_pluginvar *cast_pluginvar() { return 0; }
+protected:
+ void set_allow_empty_value(bool allow_empty_value)
+ {
+ m_allow_empty_value= allow_empty_value;
+ }
+
private:
const Binlog_status_enum binlog_status;
+
+ bool m_allow_empty_value;
};
@@ -878,8 +887,11 @@ public:
sys_var_log_output(sys_var_chain *chain, const char *name_arg, ulong *value_arg,
TYPELIB *typelib, sys_after_update_func func)
:sys_var(name_arg,func), value(value_arg), enum_names(typelib)
- { chain_sys_var(chain); }
- bool check(THD *thd, set_var *var)
+ {
+ chain_sys_var(chain);
+ set_allow_empty_value(FALSE);
+ }
+ virtual bool check(THD *thd, set_var *var)
{
return check_set(thd, var, enum_names);
}