Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix leaking connections in fetch_optional (launchbadge#2647) (launchb…
…adge#3194) When using the 'Any' driver with MySQL backend, fetch_optional does not return the connection to the pool if no results are returned from the query. This is due to not all of the packets being read from the underlying stream. This fix continues to read result packets from the stream until they have all been exhausted (just like the normal MySql drivers implementation of fetch_optional). In general, a better refactoring would be to call the MySQL fetch_optional code in the Any driver, rather than re-implementing and duplicating code.
- Loading branch information