diff --git a/AUTHORS b/AUTHORS index e3370e025..fee2d5ccf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -101,6 +101,7 @@ Xiuming Chen Xuehong Chan Zhenye Xie Zhixin Wen +Ziheng Lyu # Organizations diff --git a/dsn.go b/dsn.go index 93f3548cb..a306d66a3 100644 --- a/dsn.go +++ b/dsn.go @@ -426,7 +426,6 @@ func parseDSNParams(cfg *Config, params string) (err error) { // Collation case "collation": cfg.Collation = value - break case "columnsWithAlias": var isBool bool diff --git a/statement_test.go b/statement_test.go index ac6b92de9..2563ece55 100644 --- a/statement_test.go +++ b/statement_test.go @@ -36,7 +36,7 @@ func TestConvertDerivedByteSlice(t *testing.T) { t.Fatal("Byte slice not convertible", err) } - if bytes.Compare(output.([]byte), []byte("value")) != 0 { + if !bytes.Equal(output.([]byte), []byte("value")) { t.Fatalf("Byte slice not converted, got %#v %T", output, output) } } diff --git a/utils.go b/utils.go index b400cf99f..bcdee1b46 100644 --- a/utils.go +++ b/utils.go @@ -199,7 +199,7 @@ func parseByteYear(b []byte) (int, error) { return 0, err } year += v * n - n = n / 10 + n /= 10 } return year, nil }