Skip to content

Commit

Permalink
恢复stmt.numInput = -1,不含问号语句不走预处理
Browse files Browse the repository at this point in the history
  • Loading branch information
luyu6056 committed Oct 20, 2020
1 parent eb41846 commit 7ed7f56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql_driver_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func (conn *Database_mysql_conn) Prepare(query string) (driver.Stmt, error) {
}
stmt := &Database_mysql_stmt{conn: conn, query: query, ref: 1}
if strings.Index(query, "?") == -1 {
//stmt.numInput = -1
//return stmt, nil
stmt.numInput = -1
return stmt, nil
}
var err error
sql := Str2bytes(query)
Expand Down

0 comments on commit 7ed7f56

Please sign in to comment.