Should also probably support MYSQL_TYPE_STRING - so you can extract the binary representation of a string.