[ refdb-Bugs-2795347 ] Too many extended notes are deleted

"SourceForge.net" <[email protected]> Sat, 23 May 2009 21:12:47 +0000
Newsgroups gmane.text.refdb.devel
Message-ID <[email protected]>
Bugs item #2795347, was opened at 2009-05-22 14:04
Message generated for change (Comment added) made by mhoenicka
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=2795347&group_id=26091

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: refdbd
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Torsten Bronger (bronger)
Assigned to: Markus Hoenicka (mhoenicka)
Summary: Too many extended notes are deleted

Initial Comment:
refdbd received the following command from me:

addlink -d biblio -E utf-8 -r -u drefdbuser1 -w 055106045081047114063119089044 ":NCK:=django-refdb-relevance-3 :CK:=Bld2006"

The log further says:

SELECT note_id FROM t_note WHERE note_key='django-refdb-relevance-3'
SELECT refdb_id FROM t_refdb WHERE refdb_citekey='Bld2006'
SELECT xnote_id FROM t_xnote WHERE xnote_type='REFERENCE' AND xref_id=1
DELETE FROM t_xnote WHERE xnote_id=78
DELETE FROM t_xnote WHERE xnote_id=79
UPDATE t_meta SET meta_modify_date='2009-05-22 11:55:59' WHERE meta_type='risx'
command processing done, finish dialog now

I interpret this output so that *two* links to extended notes were deleted.  However, the command clearly says that only one should be deleted.  In particular, refdbd deleted the links to both "django-refdb-relevance-3" and (erroneously) "django-refdb-relevance-2".

----------------------------------------------------------------------

>Comment By: Markus Hoenicka (mhoenicka)
Date: 2009-05-23 23:12

Message:
I've checked in a fix for this problem. Could you please test the latest
svn revision? Please also check other commands which may delete links, like
addref, updateref, deleteref, for adverse effects of these patches.

----------------------------------------------------------------------

Comment By: Markus Hoenicka (mhoenicka)
Date: 2009-05-22 23:03

Message:
The current code indeed removes all t_xnote entries related to a particular
item instead of just the requested link. I'm working on a fix.

----------------------------------------------------------------------

Comment By: Torsten Bronger (bronger)
Date: 2009-05-22 14:23

Message:
I tried the official client and experienced the same problem:

refdbc: getnote :ID:=1
999:0 retrieved:0 failed
refdbc: addlink :NCK:=django-refdb-relevance-3 :CK:=Bld2006
421:django-refdb-relevance-3 -> REFERENCE:Bld2006
999:1 added:0 skipped:0 failed
refdbc: addlink :NCK:=django-refdb-relevance-2 :CK:=Bld2006
421:django-refdb-relevance-2 -> REFERENCE:Bld2006
999:1 added:0 skipped:0 failed
refdbc: getnote :ID:=1
Note ID:213 (Fri May 22 2009)
Key: django-refdb-relevance-2


Note ID:214 (Fri May 22 2009)
Key: django-refdb-relevance-3


999:2 retrieved:0 failed
refdbc: deletelink :NCK:=django-refdb-relevance-2 :CK:=Bld2006
419:django-refdb-relevance-2 -> REFERENCE:Bld2006
999:1 removed:0 skipped:0 failed
refdbc: getnote :ID:=1
999:0 retrieved:0 failed
refdbc: 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=2795347&group_id=26091

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com