SQLITE3 error: malformed database schema (is_trans

2019-04-28 10:42发布

问题:

I m using OS X 10.9.5 and Google crome: Version 44.0.2403.107 (64-bit)

Google Crome store cookies at path: /Users/(logged User)/Library/Application Support/Google/Chrome/Default/Cookies I opened this file through app "SQLite Free - Datum"; it show that column name is "cookies" as shown in image.

I opened same file through Terminal of OSX 10.9.5. I am getting "malformed database schema (is_transient) - near "where": syntax error" while executing command "SELECT * FROM cookies" as shown in pin below.

回答1:

OS X 10.9.5 (Mavericks) comes with SQLite 3.7.13 installed by default. The database schema for Chrome cookies has recently been changed to utilize partial indexes, which are supported on SQLite 3.8.0 and higher (https://www.sqlite.org/partialindex.html). OS X 10.10 (Yosemite) ships with SQLite 3.8.5 installed by default, so you can access the database through the Terminal just fine in Yosemite.

It looks like the Chrome team is aware that partial indexes are not supported on earlier versions of SQLite, as shown in this bug report: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/5OPhshJdrTM.

The reason that you were able to open the database in "SQLite Free - Datum" is most likely that the app author shipped it with a newer version of SQLite.