On 11-01-18 18:01, Matthew Towler wrote: > Hi > > I believe I have found a bug in sqlite, which my tests show was introduced > between versions 3.7.17 and 3.8.0 and remains present in all versions up to > and including 3.21.0 (I have also tested 3.8.11, 3.9.3, 3.12.2 all of which > hang. I believe it closely related to, and probably just a bigger version > of, bug https://www.sqlite.org/src/tktview/9f2eb3abac9b83222f8a (problems > with indices with more than four columns) which was introduced in 3.8.0, and > fixed in a later version. I am struggling slightly to produce a small > example for reproduction as to get it to fail requires both a complex > arrangement of tables and a significant volume of data (it all works > flawlessly when there are only a few rows) and the data I have is > proprietary. I thought in the first instance I might be able to pass on what > I can easily and as it is so very similar to the previous issue someone > familiar with the code might understand the issue immediately - whilst I work > on getting more data I can pass on. I hope this is acceptable, apologies for > the long message. > > I have an ABUNDANCE table with 12 rows, with a unique index across all the > rows. > > CREATE TABLE ABUNDANCE(AbundanceId INTEGER PRIMARY KEY NOT NULL,AbundanceId0 > INTEGER,AbundanceId1 INTEGER,AbundanceId2 INTEGER,AbundanceId3 > INTEGER,AbundanceId4 INTEGER,AbundanceId5 INTEGER,AbundanceId6 > INTEGER,AbundanceId7 INTEGER,AbundanceId8 INTEGER,SetAbundanceId0 > INTEGER,SetAbundanceId1 INTEGER,SetAbundanceId2 INTEGER);
a more readable version: CREATE TABLE ABUNDANCE( AbundanceId INTEGER PRIMARY KEY NOT NULL, AbundanceId0 INTEGER, AbundanceId1 INTEGER, AbundanceId2 INTEGER, AbundanceId3 INTEGER, AbundanceId4 INTEGER, AbundanceId5 INTEGER, AbundanceId6 INTEGER, AbundanceId7 INTEGER, AbundanceId8 INTEGER, SetAbundanceId0 INTEGER, SetAbundanceId1 INTEGER, SetAbundanceId2 INTEGER); > CREATE UNIQUE INDEX ABUNDANCE_UNIQUE_DATA_INDEX ON > ABUNDANCE(AbundanceId0,AbundanceId1,AbundanceId2,AbundanceId3,AbundanceId4,AbundanceId5,AbundanceId6,AbundanceId7,AbundanceId8,SetAbundanceId0,SetAbundanceId1,SetAbundanceId2); > CREATE INDEX ABUNDANCE ON > ABUNDANCE(AbundanceId0,AbundanceId1,AbundanceId2,AbundanceId3,AbundanceId4,AbundanceId5,AbundanceId6,AbundanceId7,AbundanceId8); Error: there is already a table named ABUNDANCE When trying (good try !) to report an error, make sure you copy/paste this kind of stuff, of tripple check! _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users