diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-06-06 00:07:27 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-06-06 00:07:27 +0200 |
commit | e27c338634739ef56a6888e7948e04c0fa0ba677 (patch) | |
tree | ad63ccae614f3dd77509825d1905fd815ef322cb /sql/opt_range.cc | |
parent | 2a5905141a3c509a7c34c3d370fb146dbc1c965f (diff) | |
parent | 6d75570e99fbf070cdbeefdfbcfc94d1c7b3ad1f (diff) | |
download | mariadb-git-e27c338634739ef56a6888e7948e04c0fa0ba677.tar.gz |
5.5.38 merge
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index bfba74cf587..fc2aa75e604 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -8291,6 +8291,17 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field, if (field->cmp_type() == STRING_RESULT && value->cmp_type() != STRING_RESULT) goto end; err= value->save_in_field_no_warnings(field, 1); + if (err == 2 && field->cmp_type() == STRING_RESULT) + { + if (type == Item_func::EQ_FUNC) + { + tree= new (alloc) SEL_ARG(field, 0, 0); + tree->type= SEL_ARG::IMPOSSIBLE; + } + else + tree= NULL; /* Cannot infer anything */ + goto end; + } if (err > 0) { if (field->cmp_type() != value->result_type()) |