From af380e92cd245f1815fa16f42ea65472a7cb06ee Mon Sep 17 00:00:00 2001 From: Samantha Date: Wed, 8 Mar 2023 03:16:29 -0500 Subject: [PATCH] Use SET syntax as specified in the MySQL documentation (#1402) --- AUTHORS | 1 + connection.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 051327519..6f7041c7a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -83,6 +83,7 @@ Reed Allman Richard Wilkes Robert Russell Runrioter Wung +Samantha Frank Santhosh Kumar Tekuri Sho Iizuka Sho Ikeda diff --git a/connection.go b/connection.go index 9539077cb..947a883e3 100644 --- a/connection.go +++ b/connection.go @@ -71,10 +71,10 @@ func (mc *mysqlConn) handleParams() (err error) { cmdSet.Grow(4 + len(param) + 1 + len(val) + 30*(len(mc.cfg.Params)-1)) cmdSet.WriteString("SET ") } else { - cmdSet.WriteByte(',') + cmdSet.WriteString(", ") } cmdSet.WriteString(param) - cmdSet.WriteByte('=') + cmdSet.WriteString(" = ") cmdSet.WriteString(val) } }