Skip to content

Commit f368b3b

Browse files
committed
Merge pull request #382 from ymmt2005/interpolate_binary
Add _binary prefix when interpolating []byte data.
2 parents 69e3ed7 + 934e845 commit f368b3b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Frederick Mayle <frederickmayle at gmail.com>
2020
Gustavo Kristic <gkristic at gmail.com>
2121
Hanno Braun <mail at hannobraun.com>
2222
Henri Yandell <flamefew at gmail.com>
23+
Hirotaka Yamamoto <ymmt2005 at gmail.com>
2324
INADA Naoki <songofacandy at gmail.com>
2425
James Harr <james.harr at gmail.com>
2526
Jian Zhen <zhenjl at gmail.com>

connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ func (mc *mysqlConn) interpolateParams(query string, args []driver.Value) (strin
253253
if v == nil {
254254
buf = append(buf, "NULL"...)
255255
} else {
256-
buf = append(buf, '\'')
256+
buf = append(buf, "_binary'"...)
257257
if mc.status&statusNoBackslashEscapes == 0 {
258258
buf = escapeBytesBackslash(buf, v)
259259
} else {

0 commit comments

Comments
 (0)