Fixed memoryleaks in MySQL driver due to not closing prepared statements and resultsets.
Clean up some output