diff options
Diffstat (limited to 'sql/opt_table_elimination.cc')
-rw-r--r-- | sql/opt_table_elimination.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index 2ef565517b5..9c10790f9c0 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -1486,6 +1486,8 @@ void check_equality(Dep_analysis_context *ctx, Dep_module_expr **eq_mod, left->real_item()->type() == Item::FIELD_ITEM) { Field *field= ((Item_field*)left->real_item())->field; + if (right->cmp_type() == TIME_RESULT && field->cmp_type() != TIME_RESULT) + return; if (field->result_type() == STRING_RESULT) { if (right->result_type() != STRING_RESULT) |