1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-15759 Expect "Impossible WHERE" for indexed_int_column=out_of_range_int_constant

This commit is contained in:
Alexander Barkov
2018-07-19 17:09:24 +04:00
parent 25410d448d
commit 6bfeace10b
6 changed files with 66 additions and 2 deletions

View File

@ -8114,6 +8114,11 @@ Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM *param,
*/
else if (err == 1 && field->result_type() == INT_RESULT)
{
if (type == EQ_FUNC || type == EQUAL_FUNC) // e.g. tinyint = 200
{
tree= new (alloc) SEL_ARG_IMPOSSIBLE(field);
goto end;
}
if (type == LT_FUNC && (value->val_int() > 0))
type= LE_FUNC;
else if (type == GT_FUNC &&