[sqlite] "database disk image is malformed" error occurs more frequently...?

2015-01-28 Thread Mario M. Westphal
Hello, I’m using SQLite in one of my applications for several years with great success. The databases managed with SQLite are between 1 and maybe 10 GB, with about 50 tables or so. The platform is Windows 7 or higher. Recently I get an increasing number of error reports about “database

Re: [sqlite] "database disk image is malformed" error occurs more frequently...?

2015-01-28 Thread Richard Hipp
On 1/28/15, Mario M. Westphal wrote: > Hello, > > > > I’m using SQLite in one of my applications for several years with great > success. > > The databases managed with SQLite are between 1 and maybe 10 GB, with about > 50 tables or so. > > The platform is Windows 7 or higher. > >

Re: [sqlite] "database disk image is malformed" error occurs more frequently...?

2015-01-28 Thread Stephan Beal
On Wed, Jan 28, 2015 at 4:19 PM, Richard Hipp wrote: > On 1/28/15, Mario M. Westphal wrote: > > Recently I get an increasing number of error reports about “database disk > > image malformed” errors from my users. These errors show up out of the > blue, > > with

Re: [sqlite] "database disk image is malformed" error occurs more frequently...?

2015-01-28 Thread Simon Slavin
On 28 Jan 2015, at 3:15pm, Mario M. Westphal wrote: > The damage is usually detected during “diagnosis” runs. This feature runs an > “analyze” and a” vacuum” command in order to physically validate the database > (and to optimize and compact it). Please don't do that.

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-28 Thread Mario M. Westphal
1. I don’t have the damaged databases here so I cannot run the diagnosis myself. The databases are usually too large to upload or transfer. 2. The SQLite version I currently use is 3.8.8.1 (complied using the Amalgation and Visual Studio 2012). But since not every user always keeps up to day,

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-28 Thread Richard Hipp
On 1/28/15, Mario M. Westphal wrote: > 1. I don’t have the damaged databases here so I cannot run the diagnosis > myself. The databases are usually too large to upload or transfer. > > 2. The SQLite version I currently use is 3.8.8.1 (complied using the > Amalgation and Visual

[sqlite] ROWID-based queries slow in FTS db

2015-01-28 Thread farkas andras
Hi all, Im using FTS through DBD::SQLite (perl) to query large text databases (~10GB, ~10 million records). The regular FTS MATCH searches work fine (they usually run under a second), but searches based on ROWID are atrociously slow and hog massive amounts of memory. Im trying to retrieve a

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-28 Thread RSmith
On 2015/01/28 20:06, Mario M. Westphal wrote: 1. I don’t have the damaged databases here so I cannot run the diagnosis myself. The databases are usually too large to upload or transfer. 2. The SQLite version I currently use is 3.8.8.1 (complied using the Amalgation and Visual Studio 2012).

[sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Donald Shepherd
This is a bit of a speculative question related to a problem I'm having - are there legal values of a C++ double that would get truncated when written into and read from an SQLite database? The column is specified as having REAL affinity though I gather that shouldn't matter.

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Igor Tandetnik
On 1/28/2015 5:47 PM, Donald Shepherd wrote: This is a bit of a speculative question related to a problem I'm having - are there legal values of a C++ double that would get truncated when written into and read from an SQLite database? Written into and read from how, exactly? Do they, say,

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Donald Shepherd
I can say there's no string round-trips with fairly high confidence and I am using _bind_double and _column_double. I can also confirm NaNs are a special case, as I've had to write code to store those as a BLOB. On Thu Jan 29 2015 at 9:57:14 AM Igor Tandetnik wrote: > On

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread RSmith
On 2015/01/29 01:00, Donald Shepherd wrote: I can say there's no string round-trips with fairly high confidence and I am using _bind_double and _column_double. I can also confirm NaNs are a special case, as I've had to write code to store those as a BLOB. So you have a case where you have a

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Simon Slavin
On 28 Jan 2015, at 10:47pm, Donald Shepherd wrote: > This is a bit of a speculative question related to a problem I'm having - > are there legal values of a C++ double that would get truncated when > written into and read from an SQLite database? In theory there

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Donald Shepherd
Thanks for the reassurances. I have a case where differences in doubles would explain what I'm seeing but I have no evidence that it is the case (evidence compilation is still underway), hence my attempt to plumb the depths of the list's knowledge to see if there was any known edge cases to be

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread James K. Lowden
On Wed, 28 Jan 2015 23:09:21 + Simon Slavin wrote: > > This is a bit of a speculative question related to a problem I'm > > having - are there legal values of a C++ double that would get > > truncated when written into and read from an SQLite database? > > In theory

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Simon Slavin
On 29 Jan 2015, at 3:05am, James K. Lowden wrote: > We can make stronger statements than that, can't we? It's not like > there's some mystery about it: database and memory share a single > floating-point format. > > If the caller uses _bind_double and

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Igor Tandetnik
On 1/28/2015 10:05 PM, James K. Lowden wrote: I'm faintly surprised NaNs can't be stored, too. Why should SQLlite interpret them if they're bound to a double? Signaling NaN may trigger a hardware exception (aka a signal) merely by being loaded into an FPU register (that's what makes it