ah, sorry ...

Am 01.07.2010 09:49, schrieb Jan:
> Which row (node_id, attribute) is not unique?
>
> Jan
>
> Am 30.06.2010 23:37, schrieb Steve Hurst:
>> Hi all, not sure if this is a bug or user error - any insight appreciated!
>>
>> I have a schema that defines a two column primary key on a table - the docs 
>> indicate this will create a unique composite key.  However, code running 
>> "INSERT OR REPLACE INTO ..." many times over a long period of time 
>> eventually produces multiple rows that have the same primary key - see below.
>>
>> SQLite 3.3.6 on RHEL 5.4 from the RHN repo, I have a gzip of the db if it is 
>> helpful?
>>
>> Thanks - Steve
>>
>>
>>
>> ----- snip ----------
>>
>> sqlite>   .schema node_attributes
>> CREATE TABLE node_attributes
>>      (
>>      node_id      text,
>>      attribute    text,
>>      value        text,
>>      PRIMARY KEY ( node_id, attribute )
>>      );
>> CREATE INDEX node_attribute ON node_attributes (attribute);
>> sqlite>   select count() as onlyone, node_id, attribute from node_attributes 
>> group by node_id, attribute having onlyone>1;
>> 2|lcdre36821|CONTAINERNODE
>> 336|lcdre36821|CONTAINERNODE
>> 337|lcdre36821|STATE
>> 337|lcdre36889|CONTAINERNODE
>> 338|lcdre36889|STATE
>> 338|r03idpx12|STATE
>> 152|r03idpx14|STATE
>> 679|r06idpx27|STATE
>> 656|r06idpx29|STATE
>> sqlite>
>>
>> ----- snip ----------
>>
>>
>> _______________________________________________
>> sqlite-users mailing list
>> [email protected]
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to