summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index c2a7edb735a..021a793618f 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -124,9 +124,7 @@ bool Item_str_func::fix_fields(THD *thd, Item **ref)
In Item_str_func::check_well_formed_result() we may set null_value
flag on the same condition as in test() below.
*/
- maybe_null= (maybe_null ||
- test(thd->variables.sql_mode &
- (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)));
+ maybe_null= maybe_null || thd->is_strict_mode();
return res;
}