[MDEV-32259] Test from win.test fails with statement memory protection Created: 2023-09-27  Updated: 2023-11-30  Resolved: 2023-11-30

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - Window functions
Affects Version/s: 10.4, 10.5, 10.6, 10.10, 10.11, 11.1, 11.2
Fix Version/s: 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3, 11.2.2, 11.3.1

Type: Bug Priority: Critical
Reporter: Igor Babaev Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: affects-tests


 Description   

The following test case from win.test fails if the server is built with -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON

prepare stmt from
"select row_number() over (partition by 4 order by 1+2)";
execute stmt;
execute stmt;
deallocate prepare stmt;

The test case fails with the assertion abort that points to the allocation of list elements for each unnamed window spec at each execution of PS. The allocation is done on the statement memory in the function setup_windows().



 Comments   
Comment by Igor Babaev [ 2023-09-27 ]

@sanja, please review (see also bb-10.4-igor)

Comment by Oleksandr Byelkin [ 2023-09-27 ]

OK to push

Comment by Igor Babaev [ 2023-11-30 ]

A fix for this bug was pushed into 10.4

Generated at Thu Feb 08 10:30:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.