Re: [sqlite] Database identified as zip

2018-10-30 Thread Dingyuan Wang
It opens correctly now. 2018-10-30 22:37, Richard Hipp: > On 10/30/18, Dingyuan Wang wrote: >> >> Is this considered a bug? > > Should be fixed on trunk, now. > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sql

Re: [sqlite] Database identified as zip

2018-10-30 Thread Stephen Chrzanowski
That said, I still didn't know the shell/CLI could do that. But 14.5 and 14.6 are pretty far down https://sqlite.org/cli.html so, I probably gave up after 6.1 or 6.2 {smirk} Good nugget to keep rattling in my head. On Tue, Oct 30, 2018 at 10:44 AM Richard Hipp wrote: > > The core SQLite li

Re: [sqlite] Database identified as zip

2018-10-30 Thread Richard Hipp
On 10/30/18, Stephen Chrzanowski wrote: > > Second, shouldn't SQLite only consider reading a file if the file size is > zero or if the appropriate SQLite header is found, and completely ignore > the file extension? The core SQLite library understands SQLite database files only. Reading and writin

Re: [sqlite] Database identified as zip

2018-10-30 Thread Richard Hipp
On 10/30/18, Dingyuan Wang wrote: > > Is this considered a bug? Should be fixed on trunk, now. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo

Re: [sqlite] Database identified as zip

2018-10-30 Thread Stephen Chrzanowski
First off, I didn't know that SQLite could read from zip files directly. I don't like it, but, I'm sure there's a use case somewhere. Second, shouldn't SQLite only consider reading a file if the file size is zero or if the appropriate SQLite header is found, and completely ignore the file extensi

Re: [sqlite] Database identified as zip

2018-10-30 Thread Richard Hipp
On 10/30/18, Dingyuan Wang wrote: > I look at the database file, there is a half zip file in the end. So > maybe the PK header confused the SQLite command line. That is the likely explanation. The code that deduces the database type (whether it is an ordinary SQLite database file, or a ZIP arch

[sqlite] Database identified as zip

2018-10-30 Thread Dingyuan Wang
Dear list, When my database opened with sqlite3 command line program, it shows this: SQLite version 3.26.0 2018-10-29 21:01:28 Enter ".help" for usage hints. sqlite> .schema CREATE VIRTUAL TABLE zip USING zipfile('funddata.db') /* zip(name,mode,mtime,sz,rawdata,data,method) */; sqlite> select * f