Fossil SCM

Temporary fix for a bad query plan caused by issues in SQLite. See [forum:/forumpost/6900455c28dcd3da|forum post 6900455c28dcd3da].

drh 2024-06-14 00:06 trunk
Commit 9866c97b357062f8ef3c3f5a5aa92c065d0de1f3d82655d0a4cb343dd44aeccf
1 file changed +1 -1
--- src/descendants.c
+++ src/descendants.c
@@ -247,11 +247,11 @@
247247
" AND event.objid=plink.pid"
248248
" ORDER BY mtime DESC"
249249
" )"
250250
" SELECT ancestor.rid FROM ancestor"
251251
" WHERE EXISTS(SELECT 1 FROM tagxref"
252
- " WHERE tagid=%d AND tagxref.rid=ancestor.rid"
252
+ " WHERE tagid=%d AND tagxref.rid=+ancestor.rid"
253253
" AND value=%Q AND tagtype>0)"
254254
" LIMIT 1",
255255
rid, rid, TAG_BRANCH, zBranch
256256
);
257257
}
258258
--- src/descendants.c
+++ src/descendants.c
@@ -247,11 +247,11 @@
247 " AND event.objid=plink.pid"
248 " ORDER BY mtime DESC"
249 " )"
250 " SELECT ancestor.rid FROM ancestor"
251 " WHERE EXISTS(SELECT 1 FROM tagxref"
252 " WHERE tagid=%d AND tagxref.rid=ancestor.rid"
253 " AND value=%Q AND tagtype>0)"
254 " LIMIT 1",
255 rid, rid, TAG_BRANCH, zBranch
256 );
257 }
258
--- src/descendants.c
+++ src/descendants.c
@@ -247,11 +247,11 @@
247 " AND event.objid=plink.pid"
248 " ORDER BY mtime DESC"
249 " )"
250 " SELECT ancestor.rid FROM ancestor"
251 " WHERE EXISTS(SELECT 1 FROM tagxref"
252 " WHERE tagid=%d AND tagxref.rid=+ancestor.rid"
253 " AND value=%Q AND tagtype>0)"
254 " LIMIT 1",
255 rid, rid, TAG_BRANCH, zBranch
256 );
257 }
258

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button