From 8f3fd317dac97965a6b5763b4154b6aaeb2a01c4 Mon Sep 17 00:00:00 2001 From: cruis Date: Wed, 11 Nov 2020 16:12:57 +0800 Subject: [PATCH] Fix 4298 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Condition的clone方法,params存在共享内存,导致isCond死循环。 --- client/orm/orm_conds.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/orm/orm_conds.go b/client/orm/orm_conds.go index b4e1ce7a..5409406e 100644 --- a/client/orm/orm_conds.go +++ b/client/orm/orm_conds.go @@ -152,5 +152,8 @@ func (c *Condition) IsEmpty() bool { // clone clone a condition func (c Condition) clone() *Condition { + params := make([]condValue, len(c.params)) + copy(params, c.params) + c.params = params return &c }