소스 검색

fix bug that empty query in transaction (#801)

Kevin Wan 3 년 전
부모
커밋
5b22823018
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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
 }