v.23.3Improvement

Fix memory leak in MySQL integration with connection_auto_close enabled

Fix memory leak in MySQL integration (reproduces with connection_auto_close=1). #47732 (Kseniia Sumarokova).
Fixes a memory leak issue in the ClickHouse MySQL integration when using the connection_auto_close=1 setting.

Why it matters

This fix addresses a memory leak that occurred during MySQL integration connections configured with connection_auto_close=1. By resolving this, the stability and resource efficiency of ClickHouse when working with MySQL data sources are improved, preventing unnecessary memory consumption during automatic connection closures.

How to use it

Users who utilize the MySQL integration with the connection_auto_close=1 setting will benefit from this fix automatically after upgrading to the new version. No additional configuration changes are required.