Przeglądaj źródła

Was using wrong variable to retrieve begin keyword

Nimi Wariboko Jr 11 lat temu
rodzic
commit
6aad082f87
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      conn.go

+ 1 - 1
conn.go

@@ -361,7 +361,7 @@ func (c *Conn) executeQuery(qry *Query) *Iter {
 		stmtType = strings.ToLower(stmtType[:n])
 		switch stmtType {
 		case "begin":
-			stmtTail := strings.TrimSpace(stmtType[n:])
+			stmtTail := strings.TrimSpace(op.Stmt[n:])
 			if n := strings.IndexFunc(stmtTail, unicode.IsSpace); n >= 0 {
 				stmtType = stmtType + " " + strings.ToLower(stmtTail[:n])
 			}