[CONC-666] Repeated mysql_stmt_execute+mysql_store_result allocate increasingly more memory Created: 2023-09-13  Updated: 2023-09-20  Resolved: 2023-09-20

Status: Closed
Project: MariaDB Connector/C
Component/s: Prepared Statements
Affects Version/s: None
Fix Version/s: 3.1.23, 3.3.8

Type: Bug Priority: Blocker
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File bug.c    

 Description   

Repeated mysql_stmt_execute+mysql_store_result allocate more and more memory,
This happens if the result set is more than approx. 4K in size

I'm attaching a reproducible test case
according to it, virtual memory use of the process grows from 1.5MB to almost 1GB after executing prepared "select repeat('a',5000)" statement 1 million times.

I think all versions are affected, even though the attached pull request is against 3.3


Generated at Thu Feb 08 03:06:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.