Fossil

View Ticket
Login

View Ticket

2010-10-31
23:03 Fixed ticket [b18338c226]: include sqlite shell with fossil plus 1 other change ... (artifact: e4002b1c47 user: drh)
21:51
Add a warning to the "fossil sqlite3" command to remind users that careless use of the command can easily corrupt the repository. Ticket [b18338c226f6fb4899]. ... (check-in: 4e1241f323 user: drh tags: trunk)
2010-10-29
23:51 Ticket [b18338c226] include sqlite shell with fossil status still Open with 2 other changes ... (artifact: de9f1c6b85 user: anonymous)
19:06
Add the "sqlite3" command providing an sqlite3 command-line shell. Ticket [b18338c226f6fb4899b] ... (check-in: 8c723318d2 user: drh tags: trunk)
2010-10-28
23:31 New ticket [b18338c226] include sqlite shell with fossil. ... (artifact: 616949ea30 user: anonymous)

Ticket Hash: b18338c226f6fb4899bf646accf79cd0bca221a1
Title: include sqlite shell with fossil
Status: Fixed Type: Feature_Request
Severity: Cosmetic Priority:
Subsystem: Resolution: Fixed
Last Modified: 2010-10-31 23:03:24
15.42 years ago
Created: 2010-10-28 23:31:34
15.43 years ago
Version Found In:
Description:
There are a very small number of cases where it is necessary or desirable to work directly with the fossil database - debugging, exploring, or tweaking low-level data in a nonstandard and generally unrecommended way (for example, when merging repositories as described in http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg01641.html ). Nevertheless, in those cases it is necessary to have the sqlite shell available separately. Fossil already bundles 95% of sqlite with it, so why not include the raw shell also? The main benefit (in those admittedly rare cases) would be that you are guaranteed to have the correct version of sqlite, while the shell installed elsewhere may be different (if you are tracking fossil and sqlite builds separately).

anonymous added on 2010-10-29 23:51:13:
How to access functions accessible in fossil by built-in sqlite shell?

Thanks.

c:\bin>fossil help sqlite
Usage: fossil sqlite3 ?DATABASE? ?OPTIONS?
Run the standalone sqlite3 command-line shell on DATABASE with OPTIONS.
If DATABASE is omitted, then the repository that serves the working
directory is opened.

c:\bin>fossil sqlite myfossilclone.fossil SQLite version 3.7.3 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> SELECT * FROM sqlite_master where name ='blob'; table|blob|blob|2|CREATE TABLE blob( rid INTEGER PRIMARY KEY, rcvid INTEGER, size INTEGER, uuid TEXT UNIQUE NOT NULL, content BLOB, CHECK( length(uuid)==40 AND rid>0 ) )

sqlite> select * from blob where rid =9310; 9310|526|43735|a67ab11ff47c2c026af817110a564a13fd9c33a2|

sqlite> select content from blob where rid =9310; returns nothing