SQLite outputs a database with an unexpected token
pshem opened this issue · 2 comments
pshem commented
After using sigbak
to extract a signal backup to an SQLite database, I opened the database in sqlitebrowser
, which discovered two unexpected tokens. Is this normal, or did I run into an edge case? The database passes integrity checks and contains what I would expect otherwise.
pshem@PiDell-K:~/z/source/sigbak$ ./sigbak sqlite ./signal-2020-02-20-11-56-23.backup ./signal_sqlite.db
pshem@PiDell-K:~/z/source/sigbak$ ./sigbak check
pshem@PiDell-K:~/z/research_android$ sqlitebrowser --read-only signal_sqlite.db
Sqlite parse error: line 1:47: unexpected token: thread_id(CREATE VIRTUAL TABLE sms_fts USING fts5(body, thread_id UNINDEXED, content=sms, content_rowid=_id))
Sqlite parse error: line 1:47: unexpected token: thread_id(CREATE VIRTUAL TABLE mms_fts USING fts5(body, thread_id UNINDEXED, content=mms, content_rowid=_id))
I've built sigbak on Kubuntu 19.10 with the default toolchain of gcc 9.2.1.
pshem commented
Sorry, looks like the problem is with sqlitebrowser no loading the fts5 extension. My bad!
tbvdm commented
No worries. But yes, this is expected. It seems that sqlitebrowser
doesn't understand the [UNINDEXED
option](https://www.sqlite.org/fts5.html#the_unindexed_column_option).