From 51c325bc5b54bd5d6d820d13c1277b4cd738eb9c Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Wed, 10 Jul 2024 00:08:59 +0100 Subject: [PATCH] Optimization. --- ext/bloom/bloom.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/bloom/bloom.go b/ext/bloom/bloom.go index ed360fc..b1285b5 100644 --- a/ext/bloom/bloom.go +++ b/ext/bloom/bloom.go @@ -218,6 +218,9 @@ func (b *bloom) Update(arg ...sqlite3.Value) (rowid int64, err error) { return 0, util.ErrorString("bloom: elements cannot be updated") } + if arg[2].NoChange() { + return 0, nil + } blob := arg[2].RawBlob() f, err := b.db.OpenBlob(b.schema, b.storage, "data", 1, true) @@ -303,6 +306,9 @@ func (c *cursor) Filter(idxNum int, idxStr string, arg ...sqlite3.Value) error { } func (c *cursor) Column(ctx *sqlite3.Context, n int) error { + if ctx.VTabNoChange() { + return nil + } switch n { case 0: ctx.ResultBool(true)