
The DCB pointer in the MySQLProtocol struct doesn't appear to be updated in all cases which causes it to be an unreliable source. As the session itself is always available and it always has the service pointer properly set, it should be used instead. Also removed the dead protocol compression code and replaced the parameters with the service capability bits.