Skip to content

Commit f556aa9

Browse files
author
Nirbhay Choubey
committed
MDEV-7635: SET shouldn't fail for invalid values in strict trans mode
1 parent 04b52a0 commit f556aa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/set_var.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ bool throw_bounds_warning(THD *thd, const char *name,
464464
else
465465
llstr(v, buf);
466466

467-
if (thd->is_strict_mode())
467+
if (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES)
468468
{
469469
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, buf);
470470
return true;
@@ -484,7 +484,7 @@ bool throw_bounds_warning(THD *thd, const char *name, bool fixed, double v)
484484

485485
my_gcvt(v, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, NULL);
486486

487-
if (thd->is_strict_mode())
487+
if (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES)
488488
{
489489
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, buf);
490490
return true;

0 commit comments

Comments
 (0)