From fa8dafe5bba7b4c72c1e0bbf10d7a9e10b4ebe8a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Nov 2005 17:43:03 +0300 Subject: [PATCH] opt_range.cc: Additional fix for bug#14093 sql/opt_range.cc: Additional fix for bug#14093 --- sql/opt_range.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 22e9f94d21a..63a49a46110 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3776,6 +3776,7 @@ get_mm_leaf(PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part, SEL_ARG *tree= 0; MEM_ROOT *alloc= param->mem_root; char *str; + ulong orig_sql_mode; DBUG_ENTER("get_mm_leaf"); /* @@ -3922,7 +3923,7 @@ get_mm_leaf(PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part, field->cmp_type() != value->result_type()) goto end; /* 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 && (field->type() == FIELD_TYPE_DATE || field->type() == FIELD_TYPE_DATETIME))