[CONPY-12] prepare statement leak ? Created: 2018-07-24  Updated: 2019-12-19  Resolved: 2019-12-19

Status: Closed
Project: MariaDB Connector/Python
Component/s: DBAPI 2.0
Affects Version/s: None
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Diego Dupin Assignee: Georg Richter
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

prepared statement seems to be closed only when closing cursor when server is < 10.2.6.
cursor that execute 2 queries, will then have the first query preparation leaking ?



 Comments   
Comment by Georg Richter [ 2018-07-29 ]

Where is a leak?

  • a 2nd mysql_stmt_prepare() API call checks if the handle status is > INIT, and resets all internal variables and frees buffers.
  • mariadb_stmt_execute_direct() API call will send an additional COM_STMT_CLOSE if the status is > INIT, since the statement id has to be set to -1.
Generated at Thu Feb 08 03:29:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.