This is a fix for #18135, which was closed before the patches were applied. I have tested and the DB connections are properly closed.
Fixed #18135 -- Sleeping Database Connections on Startup with MySQL -…
… Made sure server version checking does not leave open connection behind.
pulled in manually