diff options
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index e3aef02637f..e26d91dcd44 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -5826,6 +5826,7 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field, { tree= new (alloc) SEL_ARG(field, 0, 0); tree->type= SEL_ARG::IMPOSSIBLE; + field->table->in_use->variables.sql_mode= orig_sql_mode; goto end; } else @@ -5859,7 +5860,10 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field, */ } else + { + field->table->in_use->variables.sql_mode= orig_sql_mode; goto end; + } } } |