summaryrefslogtreecommitdiff
path: root/sql/sys_vars.ic
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2020-02-02 15:13:29 +0300
committerAleksey Midenkov <midenok@gmail.com>2020-02-02 17:13:58 +0300
commitb615d275b8c26ecec943003e1275ee19f94d9887 (patch)
treefc7881c820dece1cafdec6fd80ae9385b864cc18 /sql/sys_vars.ic
parent5a6023cf6f5f72e36837761f5df0de91c7de62ed (diff)
downloadmariadb-git-b615d275b8c26ecec943003e1275ee19f94d9887.tar.gz
MDEV-17798 System variable system_versioning_asof accepts wrong values (10.4)
Diffstat (limited to 'sql/sys_vars.ic')
-rw-r--r--sql/sys_vars.ic9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic
index 6862dcfde6f..e983347f4ce 100644
--- a/sql/sys_vars.ic
+++ b/sql/sys_vars.ic
@@ -2634,7 +2634,10 @@ public:
if (!Sys_var_enum::do_check(thd, var))
return false;
MYSQL_TIME ltime;
- Datetime::Options opt(TIME_CONV_NONE, thd);
+ // FIXME: please resolve both conflicts to "old" and remove this comment
+ Datetime::Options opt(TIME_CONV_NONE |
+ TIME_NO_ZERO_IN_DATE |
+ TIME_NO_ZERO_DATE, thd);
bool res= var->value->get_date(thd, &ltime, opt);
if (!res)
{
@@ -2653,7 +2656,9 @@ private:
if (var->value)
{
THD *thd= current_thd;
- Datetime::Options opt(TIME_CONV_NONE, thd);
+ Datetime::Options opt(TIME_CONV_NONE |
+ TIME_NO_ZERO_IN_DATE |
+ TIME_NO_ZERO_DATE, thd);
res= var->value->get_date(thd, &out.ltime, opt);
}
else // set DEFAULT from global var