Browse Source

Was using wrong variable to retrieve begin keyword

Nimi Wariboko Jr 11 năm trước cách đây
mục cha
commit
6aad082f87
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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])
 			}