Skip to content

Commit a4f390b

Browse files
committed
updates
1 parent 3143ff8 commit a4f390b

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

client/conn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ func (c *Conn) exec_send(query string) error {
508508
}
509509
c.queryAttributes = append(c.queryAttributes, lineAttr)
510510
}
511-
512511
}
513512

514513
if c.capability&CLIENT_QUERY_ATTRIBUTES > 0 {
@@ -675,6 +674,7 @@ func (c *Conn) StatusString() string {
675674
return strings.Join(stats, "|")
676675
}
677676

677+
// SetQueryAttributes sets the query attributes to be send along with the next query
678678
func (c *Conn) SetQueryAttributes(attrs ...QueryAttribute) error {
679679
c.queryAttributes = attrs
680680
return nil

client/stmt.go

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ func (s *Stmt) write(args ...interface{}) error {
7474
}
7575
s.conn.queryAttributes = append(s.conn.queryAttributes, lineAttr)
7676
}
77-
7877
}
7978

8079
qaLen := len(s.conn.queryAttributes)

mysql/queryattributes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (qa *QueryAttribute) TypeAndFlag() []byte {
2323
case string:
2424
return []byte{MYSQL_TYPE_STRING, 0x0}
2525
case uint64:
26-
return []byte{MYSQL_TYPE_LONGLONG, UNSIGNED_FLAG}
26+
return []byte{MYSQL_TYPE_LONGLONG, PARAM_UNSIGNED}
2727
default:
2828
log.Warnf("query attribute with unsupported type %T", v)
2929
}

0 commit comments

Comments
 (0)