From d043936a71e7201187d653eaf5bbc25a887d2ca6 Mon Sep 17 00:00:00 2001 From: qingyunha <845767657@qq.com> Date: Sat, 24 Apr 2021 08:41:42 +0800 Subject: [PATCH] cmd/bbolt: pagesCommand no need db.Update (#226) Co-authored-by: Tao Qingyun --- cmd/bbolt/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bbolt/main.go b/cmd/bbolt/main.go index 3c17e56c0..93e676052 100644 --- a/cmd/bbolt/main.go +++ b/cmd/bbolt/main.go @@ -882,7 +882,7 @@ func (cmd *PagesCommand) Run(args ...string) error { fmt.Fprintln(cmd.Stdout, "ID TYPE ITEMS OVRFLW") fmt.Fprintln(cmd.Stdout, "======== ========== ====== ======") - return db.Update(func(tx *bolt.Tx) error { + return db.View(func(tx *bolt.Tx) error { var id int for { p, err := tx.Page(id)