diff --git a/src/coprocessor/codec/convert.rs b/src/coprocessor/codec/convert.rs index 9c66be9e1691..fab67b531346 100644 --- a/src/coprocessor/codec/convert.rs +++ b/src/coprocessor/codec/convert.rs @@ -151,7 +151,7 @@ pub fn convert_bytes_to_int(ctx: &mut EvalContext, bytes: &[u8], tp: FieldTypeTp Ok(val) => convert_int_to_int(ctx, val, tp), Err(_) => { ctx.handle_overflow(Error::overflow("BIGINT", &vs))?; - let val = if vs.starts_with("-") { + let val = if vs.starts_with('-') { integer_signed_lower_bound(tp) } else { integer_signed_upper_bound(tp)