Re: [sqlite] Database corrupted 28 billion bytes

2015-01-17 Thread MayW
Thank you very much! /** Disk-Space Utilization Report For junk.db3 Page size in bytes 1024 Pages in the whole file (measured) 27606264 Pages in the whole file (calculated).. 24264026 Pages that store data..

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
I have a class of database for which using sqlite3 to create a copy via the "pipe" method fails. Using an explicit intermediate file seems to work ok. I can supply a sample database to anyone interested in investigating. -- F:\2013 YearTech\Yearbook Tools\Resource>sqlite3 -version 3.7.3 F:\2

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> >Not, at least, when your database contains string data with unusual >characters that Windows feels like it should translate for you... Who can guarantee what characters are used in all their text strings, much less guarantee what unnamed transformations windows is helpfully doing to pipe data.

Re: [sqlite] Database corrupted 28 billion bytes

2015-01-17 Thread Richard Hipp
On 1/16/15, MayW wrote: > Pages on the freelist (per header) 2144 0.008% > Pages on the freelist (calculated) 3344382 12.1% The fact that the freelist size as reported by the header is different from the actual freelist size is troubling. A VACUUM shou

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Graham Holden
> I'm skeptical of the notion that cmd.exe is diddling with your data en > route to the pipe. I can't think of a time Windows munged my data in > that particular way despite more years using that lousy tool than I > care to remember. Quotes and escapes, sure, don't get me started. I would echo t

Re: [sqlite] sqlite3 tool bug summary

2015-01-17 Thread Dave Dyer
> >> But that doesn't explain the difference between redirecting to a file >> and redirecting to a pipe. using .output file works using > to direct stdout to a file works and produces the same file as .output using .read file works using < file does not work. using | to shortcut > and < doesn't wo

Re: [sqlite] sqlite3 tool bug summary

2015-01-17 Thread Richard Hipp
On 1/17/15, Dave Dyer wrote: > >> >>> But that doesn't explain the difference between redirecting to a file >>> and redirecting to a pipe. > using .output file works > using > to direct stdout to a file works and produces the same file as > .output > using .read file works > using < file does not

[sqlite] Best Practice: Storing Dates

2015-01-17 Thread Stephan Buchert
If selecting rows according to a date/timestamp is ever needed, numeric time stamps are clearly advantageous, e.g. SELECT * FROM data WHERE t BETWEEN julianday(tbegstr) AND julianday(tendstr); is much more efficient than SELECT * FROM data WHERE julianday(tstr) BETWEEN julianday(tbegstr) AND jul

Re: [sqlite] Best Practice: Storing Dates

2015-01-17 Thread Richard Hipp
On 1/17/15, Stephan Buchert wrote: > If selecting rows according to a date/timestamp is ever needed, numeric > time stamps are clearly advantageous, e.g. > > SELECT * FROM data WHERE t BETWEEN julianday(tbegstr) AND > julianday(tendstr); > > is much more efficient than > > SELECT * FROM data WHERE

Re: [sqlite] sqlite3 tool bug summary

2015-01-17 Thread Dave Dyer
> > .once '| sqlite3 new.db' > .dump .Once is not a command in the version of sqlite3 I use. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3 shell in windows

2015-01-17 Thread James K. Lowden
On Fri, 16 Jan 2015 14:31:40 -0800 Random Coder wrote: > If you're seeing the "Error: The specified procedure could not be > found." error, and you're not specifying an entry point in the .load > command, then no doubt the sqlite3_load_extension symbol isn't > properly exported. I'd verify that

Re: [sqlite] sqlite3 shell in windows

2015-01-17 Thread James K. Lowden
On Fri, 16 Jan 2015 16:24:21 -0700 "Keith Medcalf" wrote: > >1. The architecture of an executable file, x86 or x64. > > dumpbin -- comes with the dev kit I would have thought so, but I didn't find an option that reports it. > Importantly make sure you are exporting "C" names. I'm pretty

[sqlite] Best Practice: Storing Dates

2015-01-17 Thread Stephan Buchert
> > This is also fast: SELECT * FROM data WHERE tstr BETWEEN tbegstr AND > tendstr; And it works just as well if dates are in the ISO8601 format. Aha, yes, thanks, this is certainly a better SELECT than converting string data to numeric Julian Days. And the string can have as much resolution as n

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/17/2015 12:20 PM, Graham Holden wrote: > I would echo this: it's good at mangling the command-line, but > I've not been aware of it ever mangling data sent to a file/stream > (other than the binary/text mode conversions). In text mode (the defau

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Richard Hipp
On 1/17/15, Roger Binns wrote: >> > The bug in the SQLite shell is that it tries to manage the encoding > itself, which is fine if the file is in binary mode. But with > stdin/out in text mode doing so will lead to extra data mangling. The > shell needs to change stdin/out to binary mode: > OK.

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> > >OK. Dave, please try this patch at let us know if it works better for >you: https://www.sqlite.org/src/info/80541e8b94b7 > It needs #include to compile in my sources. With that, it seems to fix the problem. ___ sqlite-users mailing list sqlite-

[sqlite] System.Data.SQLite - Exception Calling SQLiteModule.DeclareTable

2015-01-17 Thread Mike Nicolino
I'm getting an exception calling SQLiteModule.DeclareTable that seems to imply the 'create table' sql being passed is invalid: "SQL logic error or missing database". Yet using that same sql on the same connection as a create table call succeeds. Reviewing the virtual table docs don't imply the

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Richard Hipp
On 1/17/15, Dave Dyer wrote: > >> >> >>OK. Dave, please try this patch at let us know if it works better for >>you: https://www.sqlite.org/src/info/80541e8b94b7 >> > > It needs #include to compile in my sources. > With that, it seems to fix the problem. > The has been in shell.c since 3.8.6.

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> >The has been in shell.c since 3.8.6. We are on 3.8.8. Why >not upgrade? >-- Here in the real world, when everything is working, we ask "why upgrade". ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/li

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Scott Robison
On Jan 17, 2015 7:29 PM, "Dave Dyer" > Here in the real world, when everything is working, we ask "why upgrade". But it wasn't working correctly so the statement doesn't really answer the question asked. :) ___ sqlite-users mailing list sqlite-users@sql

[sqlite] System.Data.SQLite for Pocket PC & RTREE

2015-01-17 Thread Green Fields
Hi I hope this message doesn't double up but the last one did not appear to make it. I'm new to the list and newish to SQLite and would appreciate some tips. I'm attempting to create an application that requires a spatial rtree query, and this works extremely well using the x86 version of the

[sqlite] sqlite3 tool bug summary

2015-01-17 Thread Dave Dyer
> >> But that doesn't explain the difference between redirecting to a file >> and redirecting to a pipe. using .output file works using > to direct stdout to a file works and produces the same file as .output using .read file works using < file does not work. using | to shortcut > and < doesn't wo

[sqlite] sqlite3 tool bug summary

2015-01-17 Thread Dave Dyer
> > .once '| sqlite3 new.db' > .dump .Once is not a command in the version of sqlite3 I use.

[sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> > >OK. Dave, please try this patch at let us know if it works better for >you: https://www.sqlite.org/src/info/80541e8b94b7 > It needs #include to compile in my sources. With that, it seems to fix the problem.

[sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> >The has been in shell.c since 3.8.6. We are on 3.8.8. Why >not upgrade? >-- Here in the real world, when everything is working, we ask "why upgrade".