Skip to content

Commit

Permalink
updating SET NAMES statement for collation
Browse files Browse the repository at this point in the history
  • Loading branch information
dvilaverde committed May 6, 2024
1 parent 2a3d211 commit b03ff0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ func ConnectWithDialer(ctx context.Context, network string, addr string, user st
}

if collation.ID > 255 {
c.SetCharset(c.collation)
if _, err := c.exec(fmt.Sprintf("SET NAMES %s COLLATE %s", c.charset, c.collation)); err != nil {
return nil, errors.Trace(err)
}
}
}

Expand Down

0 comments on commit b03ff0c

Please sign in to comment.