From d825554307ba34292c6d9cbbd425c550c2ddb818 Mon Sep 17 00:00:00 2001 From: TABRIZ ATAYI Date: Sun, 18 Oct 2020 00:05:43 +0200 Subject: [PATCH] nil point transfer '' not transfer NULL #3604 --- logger/sql.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/logger/sql.go b/logger/sql.go index 138a35ec..0ffe6b41 100644 --- a/logger/sql.go +++ b/logger/sql.go @@ -48,8 +48,6 @@ func ExplainSQL(sql string, numericPlaceholder *regexp.Regexp, escaper string, a } else { vars[idx] = "NULL" } - case fmt.Stringer: - vars[idx] = escaper + strings.Replace(fmt.Sprintf("%v", v), escaper, "\\"+escaper, -1) + escaper case driver.Valuer: reflectValue := reflect.ValueOf(v) if v != nil && reflectValue.IsValid() && ((reflectValue.Kind() == reflect.Ptr && !reflectValue.IsNil()) || reflectValue.Kind() != reflect.Ptr) {