Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Richard Hipp
On 2/16/20, Peng Yu wrote: >> Does it work when you close Firefox? If it works when Firefox is closed >> but >> not when Firefox is open, then the answer is probably no. > > I can check the content when Firefox is closed (the -wal file > disappears after Firefox is closed). > > Why the database

Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Peng Yu
> Does it work when you close Firefox? If it works when Firefox is closed but > not when Firefox is open, then the answer is probably no. I can check the content when Firefox is closed (the -wal file disappears after Firefox is closed). Why the database can not be read by another sqlite3

Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Simon Slavin
On 16 Feb 2020, at 5:15pm, Peng Yu wrote: > Why the database can not be read by another sqlite3 session when the > corresponding -wal file exists? Thanks. This is done on purpose by the developers of Firefox to prevent a security vulnerability which I will not describe in public. One of the

Re: [sqlite] WITHOUT ROWID tables

2020-02-16 Thread Bernardo Ramos
I've got no rows for both with and without rowid tables: SQLite version 3.27.2 2019-02-25 16:06:06 Enter ".help" for usage hints. sqlite> create table t1(name); sqlite> create table t2(name primary key, phone) without rowid; sqlite> pragma index_info(t1); sqlite> pragma index_info(t2); sqlite>

Re: [sqlite] WITHOUT ROWID tables

2020-02-16 Thread Peter da Silva
If you have control over the schema you can put a schema version in some table. On Sat, Feb 15, 2020, 13:21 J. King wrote: > On February 15, 2020 2:14:30 p.m. EST, Thomas Kurz > wrote: > >Wouldn't be something like > > > >SELECT sql FROM sqlite_master WHERE tbl_name='?' AND type='table' >

Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Stefan Brüns
On Sonntag, 16. Februar 2020 21:26:00 CET Simon Slavin wrote: > > One use case I am aware of (although this targets places.sqlite, not > > cookies.sqlite) is reading the history, bookmarks and tags. > These things can be done using the bookmarks API, WebExtensions API, and > other methods.

Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Simon Slavin
On 16 Feb 2020, at 8:02pm, Stefan Brüns wrote: > Will this stop anyone from just copying the DB without the -wal file? > Afterwards, the DB can be read, as there is no longer any associated log. The purpose of the locking is to prevent changes being made to the database during a browser

Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Simon Slavin
On 16 Feb 2020, at 8:44pm, Stefan Brüns wrote: > On Sonntag, 16. Februar 2020 21:26:00 CET Simon Slavin wrote: > >>> One use case I am aware of (although this targets places.sqlite, not >>> cookies.sqlite) is reading the history, bookmarks and tags. >> >> These things can be done using the

Re: [sqlite] WITHOUT ROWID tables

2020-02-16 Thread Simon Slavin
On 16 Feb 2020, at 6:00pm, Bernardo Ramos wrote: > I've got no rows for both with and without rowid tables: " as of SQLite version 3.30.0 on 2019-10-04 " ___ sqlite-users mailing list

Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Keith Medcalf
On Sunday, 16 February, 2020 10:25, Richard Hipp wrote: >> Why the database can not be read by another sqlite3 session when the >> corresponding -wal file exists? Thanks. >Because Firefox uses "PRAGMA locking_mode=EXCLUSIVE;" Perhaps on some platforms, but Firefox 73.0.0 on Windows 10

Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Stefan Brüns
On Sonntag, 16. Februar 2020 21:50:18 CET Simon Slavin wrote: > On 16 Feb 2020, at 8:44pm, Stefan Brüns wrote: > > On Sonntag, 16. Februar 2020 21:26:00 CET Simon Slavin wrote: > >>> One use case I am aware of (although this targets places.sqlite, not > >>> cookies.sqlite) is reading the

Re: [sqlite] Is it possible to dump a sqlite db that has an associated -wal file?

2020-02-16 Thread Stefan Brüns
On Sonntag, 16. Februar 2020 18:36:15 CET Simon Slavin wrote: > On 16 Feb 2020, at 5:15pm, Peng Yu wrote: > > Why the database can not be read by another sqlite3 session when the > > corresponding -wal file exists? Thanks. > > This is done on purpose by the developers of Firefox to prevent a

Re: [sqlite] Feature request: more robust handling of invalid UTF-16 data

2020-02-16 Thread Maks Verver
*Richard:* the issue with the JSON extension seems unrelated to the issue that I reported originally, which relates to the SQLite C API (specifically, the sqlite3_bind_text16() and sqlite3_bind_text16() functions). My issue is still not fixed. I've expanded my original sample code to make it

[sqlite] SQLITE_HAS_CODEC

2020-02-16 Thread Olaf Schmidt
Have just seen (in https://www.sqlite.org/src/timeline), that this compiletime-option was removed (2020-02-07). Speaking as a wrapper-author... Are there alternatives in sight, to further support: - a "ReKey"-feature in a relatively compatible manner, without breaking existing (user-)code,

Re: [sqlite] WITHOUT ROWID tables

2020-02-16 Thread x
Re my earlier post (which didn’t go out to mailing list) sqlite3_table_column_metadata(db,dbName,tblName,"rowid",0,0,0,0,0)==SQLITE_OK returns false if table tblName is a without rowid table seems to work for me. Sent from Mail for Windows 10