Build with reimp.exe / libmysql.dll.a as the interface library
Ping may return true if reconnect succeeded, so check that the connection id changed