Fixed issue#3

The length of the mediumint type has been changed (3->4) accordingly to http://dev.mysql.com/doc/internals/en/binary-protocol-value.html#packet-ProtocolBinary::MYSQL_TYPE_INT24

The test case 1000_mediumint_fix_issue_3 has been added accordingly to user-reported cases.