Details
Description
The following test case from opt_tvc.test fails if the server is built with-DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON
create table t1 (a int, b int); |
insert into t1 |
values (1,2), (4,6), (9,7), (1,1), (2,5), (7,8); |
set @@in_predicate_conversion_threshold= 2; |
prepare stmt from "select * from t1 where a in (1,2)"; |
execute stmt; |
execute stmt; |
The test case fails with the assertion abort that points to statement memory allocation at the second execution in this code of table_value_constr::prepare()
Type_holder *holders;
|
...
|
if (!(holders= new (thd->stmt_arena->mem_root) Type_holder[cnt]) ||
|
join_type_handlers_for_tvc(thd, li, holders, cnt) ||
|
get_type_attributes_for_tvc(thd, li, holders,
|
lists_of_values.elements, cnt))
|
|
Attachments
Issue Links
- causes
-
MDEV-33477 Prepare statement with only placeholders in Table Value Constructor discards values silently
- Confirmed