xnote udpate with no links
Damien Jade Duff <[email protected]>
| Newsgroups | gmane.text.refdb.general |
|---|---|
| Message-ID | <[email protected]> |
Gidday Markus
I have an eeny-weeny little problem that you'll probably be able to
solve in the blink of an eye...
I find on my system that if I insert an extended note (xnote) into the
refdb database that does not have any links to references, the note is
inserted okay, but I can no longer update it, even if the update is to
add links to references.
The problem occurred on refdb-0.9.7-pre5 and I upgraded to refdb-0.9.7
and I still got it.
I hope it's a bug that can be fixed. Details below.
Incidentally, what are the chances of getting note-note links working so
that I can create trees or even webs to navigate through my references
(this is further to my thoughts on the best way to make a GUI interface
via java/jedit)? I had a look at the t_xnote table and it seems you'd
probably either want an extra table with bidirectional links or you'd
update the existing one to be keyed by a note-link id rather than a note id.
Thanks again for all your efforts so far!
Peace
Damien
Here is the output from refdbc:
---------------------------------------------
acws-01xx% cat testnotex.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xnoteset PUBLIC "-//Markus Hoenicka//DTD Xnote V1.2//EN"
"/usr/local/share/refdb/dtd/xnote.dtd"
[
<!ENTITY lt "&#60;">
<!ENTITY gt ">">
<!ENTITY amp "&#38;">
]>
<xnoteset>
<xnote citekey="TEST123" user="djd">
<content>
This is a very humble note
</content>
</xnote>
</xnoteset>
acws-01xx% cat testnotex.xml | refdbc -d djdphd -C addnote
406:1:TEST123
408:1
999:1 added:0 skipped:0 failed
acws-01xx% cat testnotex.xml | refdbc -d djdphd -C updatenote
999:0 updated:0 added:0 skipped:0 failed
SELECT t_note.note_id, t_user.user_name FROM t_note, t_user WHERE
t_note.note_user_id=t_user.user_id AND t_note.note_key='TEST123'acws-01xx%
---------------------------------------------
The corresponding refdbd.log excerpt for both addnote and updatenote
operations looks like:
---------------------------------------------
6:pid=13881:Tue Jul 18 19:06:39 2006:adding client 127.0.0.1 on fd 6
6:pid=13881:Tue Jul 18 19:06:39 2006:server waiting n_max_fd=6
7:pid=14425:Tue Jul 18 19:06:39 2006:try to read from client
6:pid=14425:Tue Jul 18 19:06:39 2006:serving client on fd 6 with
protocol version 4
7:pid=14425:Tue Jul 18 19:06:39 2006:102-47-19-05
7:pid=14425:Tue Jul 18 19:06:39 2006:send pseudo-random string to client
7:pid=14425:Tue Jul 18 19:06:39 2006:addnote -u djd -w 061088052 -d
djdphd -s ris -E ISO-8859-1
6:pid=14425:Tue Jul 18 19:06:39 2006:dbi is up
7:pid=14425:Tue Jul 18 19:06:39 2006:localhost
7:pid=14425:Tue Jul 18 19:06:39 2006:djd
7:pid=14425:Tue Jul 18 19:06:39 2006:123
7:pid=14425:Tue Jul 18 19:06:39 2006:djdphd
7:pid=14425:Tue Jul 18 19:06:39 2006:5432
7:pid=14425:Tue Jul 18 19:06:39 2006:pgsql
7:pid=14425:Tue Jul 18 19:06:39 2006:/usr/local/share/refdb/db
7:pid=14425:Tue Jul 18 19:06:39 2006:ISO-8859-1
7:pid=14425:Tue Jul 18 19:06:39 2006:refdb
7:pid=14425:Tue Jul 18 19:06:39 2006:connected to database server using
database:
7:pid=14425:Tue Jul 18 19:06:39 2006:refdb
7:pid=14425:Tue Jul 18 19:06:39 2006:Main database looks ok:
7:pid=14425:Tue Jul 18 19:06:39 2006:refdb
7:pid=14425:Tue Jul 18 19:06:39 2006:localhost
7:pid=14425:Tue Jul 18 19:06:39 2006:djd
7:pid=14425:Tue Jul 18 19:06:39 2006:123
7:pid=14425:Tue Jul 18 19:06:39 2006:djdphd
7:pid=14425:Tue Jul 18 19:06:39 2006:5432
7:pid=14425:Tue Jul 18 19:06:39 2006:pgsql
7:pid=14425:Tue Jul 18 19:06:39 2006:/usr/local/share/refdb/db
7:pid=14425:Tue Jul 18 19:06:39 2006:ISO-8859-1
7:pid=14425:Tue Jul 18 19:06:39 2006:djdphd
7:pid=14425:Tue Jul 18 19:06:39 2006:SELECT
meta_app,meta_type,meta_dbversion from t_meta
7:pid=14425:Tue Jul 18 19:06:39 2006:connected to database server using
database:
7:pid=14425:Tue Jul 18 19:06:39 2006:djdphd
7:pid=14425:Tue Jul 18 19:06:39 2006:encoding is UTF-8, no conversion
required
7:pid=14425:Tue Jul 18 19:06:39 2006:BEGIN WORK
7:pid=14425:Tue Jul 18 19:06:39 2006:LOCK TABLE t_keyword IN SHARE MODE
7:pid=14425:Tue Jul 18 19:06:39 2006:LOCK TABLE t_user IN SHARE MODE
7:pid=14425:Tue Jul 18 19:06:39 2006:LOCK TABLE t_xkeyword IN SHARE MODE
7:pid=14425:Tue Jul 18 19:06:39 2006:LOCK TABLE t_xuser IN SHARE MODE
7:pid=14425:Tue Jul 18 19:06:39 2006:LOCK TABLE t_note IN SHARE MODE
7:pid=14425:Tue Jul 18 19:06:39 2006:LOCK TABLE t_xnote IN SHARE MODE
7:pid=14425:Tue Jul 18 19:06:39 2006:LOCK TABLE t_link IN SHARE MODE
7:pid=14425:Tue Jul 18 19:06:39 2006:LOCK TABLE t_xlink IN SHARE MODE
7:pid=14425:Tue Jul 18 19:06:39 2006:SELECT t_note.note_id,
t_user.user_name FROM t_note, t_user WHERE
t_note.note_user_id=t_user.user_id AND t_note.note_key='TEST123'
7:pid=14425:Tue Jul 18 19:06:39 2006:INSERT INTO t_note (note_key)
VALUES ('TEST123')
7:pid=14425:Tue Jul 18 19:06:39 2006:SELECT user_id FROM t_user WHERE
user_name='djd'
7:pid=14425:Tue Jul 18 19:06:39 2006:UPDATE t_note SET note_user_id=1
WHERE note_id=22
7:pid=14425:Tue Jul 18 19:06:39 2006:UPDATE t_note SET note_share=-1
WHERE note_id=22
7:pid=14425:Tue Jul 18 19:06:39 2006:UPDATE t_note SET note_content='
This is a very humble note
' WHERE note_id=22
7:pid=14425:Tue Jul 18 19:06:39 2006:UPDATE t_note SET
note_date='2006-07-18' WHERE note_id=22
7:pid=14425:Tue Jul 18 19:06:39 2006:COMMIT WORK
6:pid=14425:Tue Jul 18 19:06:39 2006:chunk added successfully
6:pid=14425:Tue Jul 18 19:06:39 2006:finished transferring data
6:pid=14425:Tue Jul 18 19:06:39 2006:chunk added successfully
7:pid=14425:Tue Jul 18 19:06:39 2006:UPDATE t_meta SET
meta_modify_date='2006-07-18 19:06:39'
7:pid=14425:Tue Jul 18 19:06:39 2006:command processing done, finish
dialog now
7:pid=14425:Tue Jul 18 19:06:39 2006:localhost
7:pid=14425:Tue Jul 18 19:06:39 2006:djd
7:pid=14425:Tue Jul 18 19:06:39 2006:123
7:pid=14425:Tue Jul 18 19:06:39 2006:djdphd
7:pid=14425:Tue Jul 18 19:06:39 2006:5432
7:pid=14425:Tue Jul 18 19:06:39 2006:pgsql
7:pid=14425:Tue Jul 18 19:06:39 2006:/usr/local/share/refdb/db
7:pid=14425:Tue Jul 18 19:06:39 2006:ISO-8859-1
7:pid=14425:Tue Jul 18 19:06:39 2006:djdphd
7:pid=14425:Tue Jul 18 19:06:39 2006:SELECT
meta_app,meta_type,meta_dbversion from t_meta
7:pid=14425:Tue Jul 18 19:06:39 2006:connected to database server using
database:
7:pid=14425:Tue Jul 18 19:06:39 2006:djdphd
7:pid=14425:Tue Jul 18 19:06:39 2006:SELECT * FROM t_keyword
7:pid=14425:Tue Jul 18 19:06:39 2006:SELECT
note_id,note_title,note_content FROM t_note WHERE note_id IN (22)
6:pid=14425:Tue Jul 18 19:06:39 2006:child finished client on fd 6
6:pid=13881:Tue Jul 18 19:06:39 2006:parent removing client on fd 6
6:pid=13881:Tue Jul 18 19:06:39 2006:server waiting n_max_fd=5
6:pid=13881:Tue Jul 18 19:06:39 2006:child exited with code 0
6:pid=13881:Tue Jul 18 19:06:39 2006:server waiting n_max_fd=5
6:pid=13881:Tue Jul 18 19:06:45 2006:adding client 127.0.0.1 on fd 6
6:pid=13881:Tue Jul 18 19:06:45 2006:server waiting n_max_fd=6
7:pid=14433:Tue Jul 18 19:06:45 2006:try to read from client
6:pid=14433:Tue Jul 18 19:06:45 2006:serving client on fd 6 with
protocol version 4
7:pid=14433:Tue Jul 18 19:06:45 2006:201-92-03-45
7:pid=14433:Tue Jul 18 19:06:45 2006:send pseudo-random string to client
7:pid=14433:Tue Jul 18 19:06:45 2006:updatenote -u djd -w 033076070 -d
djdphd -s ris -E ISO-8859-1
6:pid=14433:Tue Jul 18 19:06:45 2006:dbi is up
7:pid=14433:Tue Jul 18 19:06:45 2006:localhost
7:pid=14433:Tue Jul 18 19:06:45 2006:djd
7:pid=14433:Tue Jul 18 19:06:45 2006:123
7:pid=14433:Tue Jul 18 19:06:45 2006:djdphd
7:pid=14433:Tue Jul 18 19:06:45 2006:5432
7:pid=14433:Tue Jul 18 19:06:45 2006:pgsql
7:pid=14433:Tue Jul 18 19:06:45 2006:/usr/local/share/refdb/db
7:pid=14433:Tue Jul 18 19:06:45 2006:ISO-8859-1
7:pid=14433:Tue Jul 18 19:06:45 2006:refdb
7:pid=14433:Tue Jul 18 19:06:45 2006:connected to database server using
database:
7:pid=14433:Tue Jul 18 19:06:45 2006:refdb
7:pid=14433:Tue Jul 18 19:06:45 2006:Main database looks ok:
7:pid=14433:Tue Jul 18 19:06:45 2006:refdb
7:pid=14433:Tue Jul 18 19:06:45 2006:localhost
7:pid=14433:Tue Jul 18 19:06:45 2006:djd
7:pid=14433:Tue Jul 18 19:06:45 2006:123
7:pid=14433:Tue Jul 18 19:06:45 2006:djdphd
7:pid=14433:Tue Jul 18 19:06:45 2006:5432
7:pid=14433:Tue Jul 18 19:06:45 2006:pgsql
7:pid=14433:Tue Jul 18 19:06:45 2006:/usr/local/share/refdb/db
7:pid=14433:Tue Jul 18 19:06:45 2006:ISO-8859-1
7:pid=14433:Tue Jul 18 19:06:45 2006:djdphd
7:pid=14433:Tue Jul 18 19:06:45 2006:SELECT
meta_app,meta_type,meta_dbversion from t_meta
7:pid=14433:Tue Jul 18 19:06:45 2006:connected to database server using
database:
7:pid=14433:Tue Jul 18 19:06:45 2006:djdphd
7:pid=14433:Tue Jul 18 19:06:45 2006:encoding is UTF-8, no conversion
required
7:pid=14433:Tue Jul 18 19:06:45 2006:BEGIN WORK
7:pid=14433:Tue Jul 18 19:06:45 2006:LOCK TABLE t_keyword IN SHARE MODE
7:pid=14433:Tue Jul 18 19:06:45 2006:LOCK TABLE t_user IN SHARE MODE
7:pid=14433:Tue Jul 18 19:06:45 2006:LOCK TABLE t_xkeyword IN SHARE MODE
7:pid=14433:Tue Jul 18 19:06:45 2006:LOCK TABLE t_xuser IN SHARE MODE
7:pid=14433:Tue Jul 18 19:06:45 2006:LOCK TABLE t_note IN SHARE MODE
7:pid=14433:Tue Jul 18 19:06:45 2006:LOCK TABLE t_xnote IN SHARE MODE
7:pid=14433:Tue Jul 18 19:06:45 2006:LOCK TABLE t_link IN SHARE MODE
7:pid=14433:Tue Jul 18 19:06:45 2006:LOCK TABLE t_xlink IN SHARE MODE
7:pid=14433:Tue Jul 18 19:06:45 2006:SELECT t_note.note_id,
t_user.user_name FROM t_note, t_user WHERE
t_note.note_user_id=t_user.user_id AND t_note.note_key='TEST123'
7:pid=14433:Tue Jul 18 19:06:45 2006:SELECT keyword_id, xkeyword_id FROM
t_xkeyword WHERE xkeyword_type='NOTE' AND xref_id=22
7:pid=14433:Tue Jul 18 19:06:45 2006:SELECT link_id, xlink_id FROM
t_xlink WHERE xlink_source='NOTE' AND xref_id=22
7:pid=14433:Tue Jul 18 19:06:45 2006:SELECT xnote_id FROM t_xnote WHERE
note_id=22
6:pid=14433:Tue Jul 18 19:06:45 2006:chunk added successfully
6:pid=14433:Tue Jul 18 19:06:45 2006:finished transferring data
6:pid=14433:Tue Jul 18 19:06:45 2006:chunk added successfully
7:pid=14433:Tue Jul 18 19:06:45 2006:ROLLBACK WORK
7:pid=14433:Tue Jul 18 19:06:45 2006:command processing done, finish
dialog now
7:pid=14433:Tue Jul 18 19:06:45 2006:localhost
7:pid=14433:Tue Jul 18 19:06:45 2006:djd
7:pid=14433:Tue Jul 18 19:06:45 2006:123
7:pid=14433:Tue Jul 18 19:06:45 2006:djdphd
7:pid=14433:Tue Jul 18 19:06:45 2006:5432
7:pid=14433:Tue Jul 18 19:06:45 2006:pgsql
7:pid=14433:Tue Jul 18 19:06:45 2006:/usr/local/share/refdb/db
7:pid=14433:Tue Jul 18 19:06:45 2006:ISO-8859-1
7:pid=14433:Tue Jul 18 19:06:45 2006:djdphd
7:pid=14433:Tue Jul 18 19:06:45 2006:SELECT
meta_app,meta_type,meta_dbversion from t_meta
7:pid=14433:Tue Jul 18 19:06:45 2006:connected to database server using
database:
7:pid=14433:Tue Jul 18 19:06:45 2006:djdphd
7:pid=14433:Tue Jul 18 19:06:45 2006:SELECT * FROM t_keyword
6:pid=14433:Tue Jul 18 19:06:45 2006:no IDs found for keyword scan
6:pid=14433:Tue Jul 18 19:06:45 2006:child finished client on fd 6
6:pid=13881:Tue Jul 18 19:06:45 2006:parent removing client on fd 6
6:pid=13881:Tue Jul 18 19:06:45 2006:server waiting n_max_fd=5
6:pid=13881:Tue Jul 18 19:06:45 2006:child exited with code 0
6:pid=13881:Tue Jul 18 19:06:45 2006:server waiting n_max_fd=5
6:pid=13881:Tue Jul 18 19:07:10 2006:server exited gracefully
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV