Dear all,
there might be a bug in the replace-conflict handler of sqlite-2.8.15, but I'm
not sure about it. Here is what I do:
--
> CREATE TABLE tbl(key integer primary key, value integer, other integer);
> INSERT INTO tbl VALUES(1, 1, 3);
> INSERT OR REPLACE INTO tbl (key, value) values(1, 2);
--
The manual states:
"When a UNIQUE constraint violation occurs, the pre-existing rows that are
causing the constraint violation are removed prior to inserting or updating
the current row."
Therefore, the row of key '1' is removed and reinserted with the new value of
'value' - but what happens to the 'other'-data? I would expect, since I
explicitly specified the columns to insert-or-replace, that the 'other'-data
is still available. Actually, it is lost =(
--
> select * from tbl;
key|value|other
1|2|
--
Bug, or intended behaviour? If the latter, how may I avoid it?
Regards
Daniel
--
Dipl.-Math. (FH) Daniel Franke
Institut fuer Medizinische Biometrie und Statistik
Medizinische Universit�t zu Luebeck
Ratzeburger Allee 160, Haus 4
23538 Luebeck
Telefon: 0451-500-2786
Telefax: 0451-500-2999
[EMAIL PROTECTED]
� � /"\
� � \ / � �ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
� � �X � � � � � � � � � � � � � - AGAINST MS ATTACHMENTS
� � / \