diff options
author | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-08-01 20:44:59 +0300 |
---|---|---|
committer | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-08-27 16:15:05 +0200 |
commit | 55163ba1bdb1a05daadc66c41c959994231b361c (patch) | |
tree | c3e3001e7757fff2fc256522f5fe628aed0aa347 /sql/item_cmpfunc.cc | |
parent | 2b76f6f61dba93fd920456a0dd9efd366a6dc6b1 (diff) | |
download | mariadb-git-55163ba1bdb1a05daadc66c41c959994231b361c.tar.gz |
MDEV-16803: Pushdown Item_func_in item that uses vectors in several SELECTs
The bug appears because of the Item_func_in::build_clone() method.
The 'array' field for the Item_func_in item that can be pushed into
the materialized view/derived table was built in the wrong way.
It becomes lame after the pushdown of the condition into the first
SELECT that defines that view/derived table. The server crashes in
the pushdown into the next SELECT while trying to use already lame
'array' field.
To fix it Item_func_in::build_clone() was changed.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 577a98df0d2..69ebeb2b95c 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -4436,9 +4436,8 @@ Item *Item_func_in::build_clone(THD *thd, MEM_ROOT *mem_root) Item_func_in *clone= (Item_func_in *) Item_func::build_clone(thd, mem_root); if (clone) { - if (array && clone->create_array(thd)) - return NULL; bzero(&clone->cmp_items, sizeof(cmp_items)); + clone->fix_length_and_dec(); } return clone; } |