summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2017-01-31 12:34:38 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2017-02-10 06:30:42 -0500
commitf556aa9b5f3685dfcf1b365d2461316cbd16e169 (patch)
treec3b181f3082d55b34cf56528a276b58959d53d09 /sql/set_var.cc
parent04b52a0745dd5622d890cc4283293177cec655e0 (diff)
downloadmariadb-git-f556aa9b5f3685dfcf1b365d2461316cbd16e169.tar.gz
MDEV-7635: SET shouldn't fail for invalid values in strict trans mode
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 26eb5127a0b..004af2a5690 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -464,7 +464,7 @@ bool throw_bounds_warning(THD *thd, const char *name,
else
llstr(v, buf);
- if (thd->is_strict_mode())
+ if (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES)
{
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, buf);
return true;
@@ -484,7 +484,7 @@ bool throw_bounds_warning(THD *thd, const char *name, bool fixed, double v)
my_gcvt(v, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, NULL);
- if (thd->is_strict_mode())
+ if (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES)
{
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, buf);
return true;