浏览代码

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
 }