util/types: remove optimisation not related to this PR.

This commit is contained in:
Ewan Chou
2015-12-29 10:23:54 +08:00
parent fca76e816c
commit d47e773bad

View File

@ -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))
}