summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-04-09 11:14:57 +0200
committerSergei Golubchik <serg@mariadb.org>2015-04-09 19:41:59 +0200
commiteb29a63e4508359a44a29c192fae347196d5a6d3 (patch)
treeb81e5632a8c8193b8bebbea594f286157f37ece0 /sql/set_var.cc
parent0a9052f591a04e617ad58ee1b19dfc3ed7084147 (diff)
downloadmariadb-git-eb29a63e4508359a44a29c192fae347196d5a6d3.tar.gz
SET STATEMENT timestamp=xxx ....
fix sys_var->is_default() method (that was using default_val property in a global sys_var object to track per-session state): * move timestamp to a dedicated Sys_var_timestamp class (in fact, rename Sys_var_session_special_double to Sys_var_timestamp) * make session_is_default a virtual method with a special implementation for timestamps * other variables don't have a special behavior for default values and can have session_is_default() to be always false.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 278a05213a6..c65ca3d59b7 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -147,7 +147,7 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
flags(flags_arg), show_val_type(show_val_type_arg),
guard(lock), offset(off), on_check(on_check_func), on_update(on_update_func),
deprecation_substitute(substitute),
- is_os_charset(FALSE), default_val(FALSE)
+ is_os_charset(FALSE)
{
/*
There is a limitation in handle_options() related to short options:
@@ -790,7 +790,6 @@ int set_var::light_check(THD *thd)
*/
int set_var::update(THD *thd)
{
- var->set_is_default(value == 0);
return value ? var->update(thd, this) : var->set_default(thd, this);
}