From aad58a221fce91128c41dfd22e0dd88db01c43b2 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 21 Feb 2023 12:37:32 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E7=A7=BB=E5=8A=A8=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=B4=A2=E5=BC=95=E6=97=B6=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/sql/database.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/sql/database.go b/kernel/sql/database.go index 502a87eb4..f5f17f948 100644 --- a/kernel/sql/database.go +++ b/kernel/sql/database.go @@ -1096,9 +1096,11 @@ func batchUpdateHPath(tx *sql.Tx, boxID, rootID, oldHPath, newHPath string) (err if err = execStmtTx(tx, stmt, newHPath, boxID, rootID, oldHPath); nil != err { return } - stmt = "UPDATE blocks_fts_case_insensitive SET hpath = ? WHERE box = ? AND root_id = ? AND hpath = ?" - if err = execStmtTx(tx, stmt, newHPath, boxID, rootID, oldHPath); nil != err { - return + if !caseSensitive { + stmt = "UPDATE blocks_fts_case_insensitive SET hpath = ? WHERE box = ? AND root_id = ? AND hpath = ?" + if err = execStmtTx(tx, stmt, newHPath, boxID, rootID, oldHPath); nil != err { + return + } } ClearCache() return