Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Manuel Rigger
Thanks for the fix! Best, Manuel On Thu, May 9, 2019 at 7:12 PM Richard Hipp wrote: > On 5/9/19, Manuel Rigger wrote: > > > > I discovered a sequence of statements that results in a malformed > database > > disk image: > > > > Should be fixed now. > > -- > D. Richard Hipp > d...@sqlite.org >

Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Richard Hipp
On 5/9/19, Manuel Rigger wrote: > > I discovered a sequence of statements that results in a malformed database > disk image: > Should be fixed now. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Richard Hipp
On 5/9/19, David Raymond wrote: > I'm curious as to what part of the integrity got > broken. There is an index on a REAL value. Maintaining such an index requires doing equality comparisons on floating-point values. The dangers of doing equality comparisons on floating-point values are well

Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread David Raymond
...@mailinglists.sqlite.org] On Behalf Of Richard Hipp Sent: Thursday, May 09, 2019 11:08 AM To: SQLite mailing list Subject: Re: [sqlite] Series of statements results in a malformed database disk image On 5/9/19, Manuel Rigger wrote: > > I discovered a sequence of statements that results in a

Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Richard Hipp
On 5/9/19, Manuel Rigger wrote: > > I discovered a sequence of statements that results in a malformed database > disk image: > > CREATE TABLE t1 (c0, c1 REAL PRIMARY KEY); > INSERT INTO t1(c0, c1) VALUES (TRUE, 9223372036854775807), (TRUE, 0); > UPDATE t1 SET c0 = NULL; > UPDATE OR REPLACE t1 SET

Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Chris Locke
Edit: HOWEVER, just ran an integrity check, and that did fail. "wrong # of entries in index sqlite_autoindex_t1_1" On Thu, May 9, 2019 at 3:52 PM Chris Locke wrote: > Are you using a new database when you create your table, or using an > existing database? > Are you writing your database

Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Chris Locke
Are you using a new database when you create your table, or using an existing database? Are you writing your database locally? What operating system / sqlite version are you using? The above test works for me... > Execution finished without errors. > Result: 1 rows returned in 62ms > At line

[sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Manuel Rigger
Hi, I discovered a sequence of statements that results in a malformed database disk image: CREATE TABLE t1 (c0, c1 REAL PRIMARY KEY); INSERT INTO t1(c0, c1) VALUES (TRUE, 9223372036854775807), (TRUE, 0); UPDATE t1 SET c0 = NULL; UPDATE OR REPLACE t1 SET c1 = 1; SELECT DISTINCT * FROM t1 WHERE