Commit e8c9cdc2 authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-32301: Server crashes at Arg_comparator::compare_row

In  Item_bool_rowready_func2::build_clone(): if we're setting
  clone->cmp.comparators=0
also set
  const_item_cache=0
as the Item is currently in a state where one cannot compute it.
parent c8866892
......@@ -18442,4 +18442,15 @@ a SUBQ
4 1=11373
5 1=11612
drop table t1,t2,t3;
#
# MDEV-32301: Server crashes at Arg_comparator::compare_row
#
SELECT * FROM ( SELECT 1 x ) ss
WHERE
x AND x OR ( ( x , x , x ) <= ( x , x , x ) )
GROUP BY
x
HAVING ( ( x = 1 ) ) ;
x
1
# End of 10.4 tests
......@@ -4013,4 +4013,14 @@ eval $q;
drop table t1,t2,t3;
--echo #
--echo # MDEV-32301: Server crashes at Arg_comparator::compare_row
--echo #
SELECT * FROM ( SELECT 1 x ) ss
WHERE
x AND x OR ( ( x , x , x ) <= ( x , x , x ) )
GROUP BY
x
HAVING ( ( x = 1 ) ) ;
--echo # End of 10.4 tests
......@@ -559,6 +559,7 @@ class Item_bool_rowready_func2 :public Item_bool_func2_with_rev
if (clone)
{
clone->cmp.comparators= 0;
clone->const_item_cache= 0;
}
return clone;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment