From d47e773badb69bc616a8d7987e1dfd9d4ee3d0c3 Mon Sep 17 00:00:00 2001 From: Ewan Chou Date: Tue, 29 Dec 2015 10:23:54 +0800 Subject: [PATCH] util/types: remove optimisation not related to this PR. --- util/types/convert.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/util/types/convert.go b/util/types/convert.go index 2954e048ee..55ebd67486 100644 --- a/util/types/convert.go +++ b/util/types/convert.go @@ -559,16 +559,6 @@ func ToUint64(value interface{}) (uint64, error) { // ToInt64 converts an interface to an int64. func ToInt64(value interface{}) (int64, error) { - switch x := value.(type) { - case int64: - return x, nil - case int: - return int64(x), nil - case uint64: - if int64(x) > 0 { - return int64(x), nil - } - } return convertToInt(value, NewFieldType(mysql.TypeLonglong)) }