Fossil

Check-in [5e34c998]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the case eType==1 (find the first check-in of the branch).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | start-of-branch-cte
Files: files | file ages | folders
SHA3-256: 5e34c9982858163d97749cb469fce26455472c6a66ec8f275e7ddec022b8e9f9
User & Date: danield 2022-03-08 12:04:19
Context
2022-03-08
13:08
Faster implementation of start_of_branch() using a CTE. ... (check-in: 8736de8b user: drh tags: trunk)
12:04
Fix the case eType==1 (find the first check-in of the branch). ... (Closed-Leaf check-in: 5e34c998 user: danield tags: start-of-branch-cte)
2022-03-04
17:56
Add braces around an if-block. ... (check-in: 9cd92711 user: danield tags: start-of-branch-cte)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/name.c.

170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
    "                              WHERE tagid=%d AND tagtype>0" 
    "                                AND value=%Q AND rid=plink.pid),"
    "           1+par.cnt"
    "      FROM plink, par"
    "     WHERE cid=par.pid AND isprim AND par.ex "
    "     LIMIT 100000 "
    "  )"
    " SELECT pid FROM par ORDER BY cnt DESC LIMIT 1",
    TAG_BRANCH, zBr, ans, TAG_BRANCH, zBr
  );
  fossil_free(zBr);
  rc = db_step(&q);
  if( rc==SQLITE_ROW ){ 
    ans = db_column_int(&q, 0);
  }
  db_finalize(&q);







|
|







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
    "                              WHERE tagid=%d AND tagtype>0" 
    "                                AND value=%Q AND rid=plink.pid),"
    "           1+par.cnt"
    "      FROM plink, par"
    "     WHERE cid=par.pid AND isprim AND par.ex "
    "     LIMIT 100000 "
    "  )"
    " SELECT pid FROM par WHERE ex>=%d ORDER BY cnt DESC LIMIT 1",
    TAG_BRANCH, zBr, ans, TAG_BRANCH, zBr, eType%2
  );
  fossil_free(zBr);
  rc = db_step(&q);
  if( rc==SQLITE_ROW ){ 
    ans = db_column_int(&q, 0);
  }
  db_finalize(&q);