Skip to content

Commit d6357d4

Browse files
author
unknown
committed
revert connection.go which was modified by accident.
1 parent 0f6bfaf commit d6357d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

connection.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ func (mc *mysqlConn) Prepare(query string) (driver.Stmt, error) {
135135
}
136136

137137
func (mc *mysqlConn) interpolateParams(query string, args []driver.Value) (string, error) {
138+
// Number of ? should be same to len(args)
139+
if strings.Count(query, "?") != len(args) {
140+
return "", driver.ErrSkip
141+
}
142+
138143
buf := mc.buf.takeCompleteBuffer()
139144
if buf == nil {
140145
// can not take the buffer. Something must be wrong with the connection

0 commit comments

Comments
 (0)