diff options
author | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-02-14 00:19:38 +0200 |
---|---|---|
committer | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-02-20 21:56:52 +0200 |
commit | 9d97e6010ebdeab0579a8371d01f34118c518b30 (patch) | |
tree | af914ad550fe6889ea2e9722f55e0f00be929ae1 /sql/sql_tvc.cc | |
parent | 947efe17ed8188ca4feef6deb0c2831a246b5c8f (diff) | |
download | mariadb-git-9d97e6010ebdeab0579a8371d01f34118c518b30.tar.gz |
MDEV-14835 Server crashes in Field_iterator_table::create_item when number of
elements of BIGINT or YEAR type in the IN list reaches in_predicate_conversion_threshold
The bug appears at the prepare stage when IN-predicate with the long list
of values is converted into IN-subquery. It happens because values in the
right operand of the IN-predicate that have BIGINT or YEAR types are converted
into the Item_int_with_ref.
To fix it in the procedure Item_func_in::create_value_list_for_tvc
real_item() is taken for each value in the right operand of the IN-predicate.
Diffstat (limited to 'sql/sql_tvc.cc')
-rw-r--r-- | sql/sql_tvc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc index 0af5ad3cd11..7004c32e602 100644 --- a/sql/sql_tvc.cc +++ b/sql/sql_tvc.cc @@ -479,7 +479,7 @@ bool Item_func_in::create_value_list_for_tvc(THD *thd, return true; } } - else if (tvc_value->push_back(args[i])) + else if (tvc_value->push_back(args[i]->real_item())) return true; if (values->push_back(tvc_value, thd->mem_root)) |