Fix for MySQL 5.1 server handshake

Fix for MySQL 5.1 server handshake
Merge for Fix MySQL 5.1 server handshake