Commit e92452c8 authored by evgen@moonbone.local's avatar evgen@moonbone.local

opt_range.cc:

  Additional fix for bug#14093
parent d7029153
...@@ -3776,6 +3776,7 @@ get_mm_leaf(PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part, ...@@ -3776,6 +3776,7 @@ get_mm_leaf(PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part,
SEL_ARG *tree= 0; SEL_ARG *tree= 0;
MEM_ROOT *alloc= param->mem_root; MEM_ROOT *alloc= param->mem_root;
char *str; char *str;
ulong orig_sql_mode;
DBUG_ENTER("get_mm_leaf"); DBUG_ENTER("get_mm_leaf");
/* /*
...@@ -3922,7 +3923,7 @@ get_mm_leaf(PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part, ...@@ -3922,7 +3923,7 @@ get_mm_leaf(PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part,
field->cmp_type() != value->result_type()) field->cmp_type() != value->result_type())
goto end; goto end;
/* For comparison purposes allow invalid dates like 2000-01-32 */ /* For comparison purposes allow invalid dates like 2000-01-32 */
ulong orig_sql_mode= field->table->in_use->variables.sql_mode; orig_sql_mode= field->table->in_use->variables.sql_mode;
if (value->real_item()->type() == Item::STRING_ITEM && if (value->real_item()->type() == Item::STRING_ITEM &&
(field->type() == FIELD_TYPE_DATE || (field->type() == FIELD_TYPE_DATE ||
field->type() == FIELD_TYPE_DATETIME)) field->type() == FIELD_TYPE_DATETIME))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment