Fossil User Forum

Database error running 'fossil info' with an unknown repository filename
Login

Database error running 'fossil info' with an unknown repository filename

Database error running 'fossil info' with an unknown repository filename

(1) By Simon Bates (sbates) on 2025-03-10 23:28:41 [source]

Today I accidentally ran fossil info all instead of fossil all info and I got a database error.

I'm running on macOS. Fossil 2.25 from MacPorts.

Steps to reproduce:

  • Change to a directory that isn't a fossil check-out (such as an empty directory)
  • Run fossil info with an argument that isn't a repository filename

Output:

% fossil version
This is fossil version 2.25 [8f798279d5] 2024-11-06 12:59:09 UTC
% fossil info foo
SQLITE_MISUSE(21): API call with NULL database connection pointer
SQLITE_MISUSE(21): misuse at line 143609 of [873d4e274b]
Database error: out of memory
SELECT objid FROM (SELECT objid FROM (SELECT * FROM event ORDER BY mtime DESC LIMIT 30) AS ex WHERE type GLOB '*' AND EXISTS(SELECT 1 FROM tagxref, tag WHERE tag.tagname='sym-foo' AND tagxref.tagid=tag.tagid AND tagxref.tagtype>0 AND tagxref.rid=ex.objid) ORDER BY mtime DESC LIMIT 1) UNION ALL SELECT * FROM (SELECT event.objid FROM tag, tagxref, event WHERE tag.tagname='sym-foo' AND tagxref.tagid=tag.tagid AND tagxref.tagtype>0 AND event.objid=tagxref.rid AND event.type GLOB '*' ORDER BY event.mtime DESC LIMIT 1) LIMIT 1;
%

(2) By Richard Hipp (drh) on 2025-03-11 00:03:16 in reply to 1 [link] [source]

Please recompile with check-in 20240311000140 or later and try again.

(3) By anonymous on 2025-03-11 00:07:33 in reply to 2 [link] [source]

Awaiting Moderator Approval

(4) By Simon Bates (sbates) on 2025-03-11 00:27:36 in reply to 2 [link] [source]

I've compiled Fossil at the commit you linked and when I do the steps as before, I now see an error message:

Coult not find or open a Fossil repository

I did notice a small typo ("Coult" rather than "Could").

Thanks very much for fixing this so quickly!

(5) By Richard Hipp (drh) on 2025-03-11 01:27:24 in reply to 2 [link] [source]

Typo fixed now.