Fix wrong return value

We should not use grn_rc for error code in MySQL. grn_rc should be
converted to MySQL error code.