Explorar o código

fix bug that empty query in transaction (#801)

Kevin Wan %!s(int64=3) %!d(string=hai) anos
pai
achega
5b22823018
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      core/stores/sqlx/tx.go

+ 2 - 1
core/stores/sqlx/tx.go

@@ -30,7 +30,8 @@ func (t txSession) Prepare(q string) (StmtSession, error) {
 	}
 
 	return statement{
-		stmt: stmt,
+		query: q,
+		stmt:  stmt,
 	}, nil
 }