From 9f31570ef7fe83a323cc771535cf0b8165622cbc Mon Sep 17 00:00:00 2001 From: Rafal Jeczalik Date: Sun, 26 May 2019 11:56:55 +0300 Subject: [PATCH] driver: format null values correctly --- driver/stmt.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/driver/stmt.go b/driver/stmt.go index 00ff42b..261383a 100644 --- a/driver/stmt.go +++ b/driver/stmt.go @@ -189,6 +189,8 @@ func replaceArgumentsODBC(query string, args []driver.Value) string { for i := range args { var arg string switch v := args[i].(type) { + case nil: + arg = "null" case time.Time: arg = v.Format(mysqlFormat) case string: