Re: [sqlite] Index on expression goes corrupt from valid SQL

2018-03-22 Thread Rowan Worth
On 23 March 2018 at 08:54, Deon Brewis wrote: > Most of the time when the database gets corrupted, we don't crash, it > corrupts midway through valid SQL (no pattern to it - completely unrelated > SQL). I was thinking if the expression functions have bugs in them it could >

Re: [sqlite] Index on expression goes corrupt from valid SQL

2018-03-22 Thread Simon Slavin
On 23 Mar 2018, at 3:02am, Deon Brewis wrote: > PS: I did send an example corrupted file to Richard - I can send it to you as > well if you like? Richard will find anything there is to find. I do hope the problem gets solved since you seem to have put so much work into it

Re: [sqlite] Index on expression goes corrupt from valid SQL

2018-03-22 Thread Deon Brewis
sqlite.org> Subject: Re: [sqlite] Index on expression goes corrupt from valid SQL On 23 Mar 2018, at 12:54am, Deon Brewis <de...@outlook.com> wrote: > However, what we see doesn't generally exhibit like the bug describes. The > bug as reported gives errors like this: > "ro

Re: [sqlite] Index on expression goes corrupt from valid SQL

2018-03-22 Thread Simon Slavin
On 23 Mar 2018, at 12:54am, Deon Brewis wrote: > However, what we see doesn't generally exhibit like the bug describes. The > bug as reported gives errors like this: > "row 1 missing from index idx1" > > Where we instead see things like: > "database disk image is malformed"

Re: [sqlite] Index on expression goes corrupt from valid SQL

2018-03-22 Thread Richard Hipp
On 3/22/18, Deon Brewis wrote: > > In general, is there anything dangerous that you can do in a custom function > inside an indexed expression that we need to watch out for? Yes: the UDF must give the same answer from the same inputs every single time. If it does not (if the

[sqlite] Index on expression goes corrupt from valid SQL

2018-03-22 Thread Deon Brewis
I was just reading through this issue: https://www.sqlite.org/src/info/343634942dd54ab Does this bug have any other symptoms other than as specified in the report above? Reason I'm asking is that we are facing quite a bit of database corruption right now. We use a lot of expression indexes