Re: [sqlite] False alarm on PRAGMA integrity_check

2017-07-15 Thread Richard Hipp
On 7/15/17, Simon Slavin  wrote:
> I verify Brendan’s report:
>

Thanks for the concise bug report, Brendan.  The ticket is
https://www.sqlite.org/src/info/a4e06e75a9ab61a1

I'm testing the fix now.  The fix might be checked in by the time you read this.

Curiously, there was an assert() that should have failed in the code
generator for this problem.  But I coded the assert() incorrectly.
:-)

Both the original problem and the assert() will be corrected when the
fix is checked in.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] False alarm on PRAGMA integrity_check

2017-07-15 Thread Simon Slavin
I verify Brendan’s report:

SQLite version 3.19.3 2017-06-27 16:48:08
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open test1.db
sqlite> CREATE TABLE Table1 (col TEXT NOT NULL PRIMARY KEY);
sqlite> ATTACH 'test2.db' AS db2;
sqlite> CREATE TABLE db2.Table2(col1 INTEGER, col2 INTEGER, col3 INTEGER, col4 
INTEGER);
sqlite> CREATE UNIQUE INDEX db2.idx_col1_unique ON Table2 (col1);
sqlite> CREATE UNIQUE INDEX db2.idx_col23_unique ON Table2 (col2, col3);
sqlite> CREATE INDEX db2.idx_col2 ON Table2 (col2);
sqlite> CREATE INDEX db2.idx_col4 ON Table2 (col4);
sqlite> INSERT INTO Table2 VALUES(1,2,3,4);
sqlite> INSERT INTO Table2 VALUES(5,6,7,8);
sqlite> PRAGMA integrity_check;
wrong # of entries in index idx_col23_unique
wrong # of entries in index idx_col1_unique

This is an unaltered copy of the shell tool, exactly as it came with the OS.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users