Closed poursadeqi closed 4 weeks ago
when the script is done I expect db to release memory allocated because of this prepared statement but allocated memory won't release.
I don't know it is a bug or expected behavior. But it shoudn't driver's bug. Report it to bugs.mysql.com.
Issue description
I'm not sure if this is a bug in mysql or driver but I have a simple script that just simply call prepare statement and close them. when the script is done I expect db to release memory allocated because of this prepared statement but allocated memory won't release. After running script i get following result as part of running
show global status like '%com_stmt%'
:and memory usage reports following output: query:
output:
while allocated memory on mysql process is more than 6G
Example code
In this code I'm not closing statements. If I close them the memory leak is gone but if command is just finished memory leak is still there although mysql reports them as closed.
Error log
Configuration
Driver version (or git SHA): v1.8.1
Go version: run
go version
1.22Server version: mysql 9.0.1, 8.0.37
Server OS: E.g. macos (mysql was on docker)