Update src-mysql.r

Add condition to skip class coercion if it's not needed.  Otherwise we get an index out of bounce error.