Skip to content

Commit b03ff0c

Browse files
committed
updating SET NAMES statement for collation
1 parent 2a3d211 commit b03ff0c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/conn.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ func ConnectWithDialer(ctx context.Context, network string, addr string, user st
143143
}
144144

145145
if collation.ID > 255 {
146-
c.SetCharset(c.collation)
146+
if _, err := c.exec(fmt.Sprintf("SET NAMES %s COLLATE %s", c.charset, c.collation)); err != nil {
147+
return nil, errors.Trace(err)
148+
}
147149
}
148150
}
149151

0 commit comments

Comments
 (0)