Replaced the use of the shared MySQLSession structure with an internal variable that tracks the currently active database.