Hi, Me again, this time I'm having a problem with an update request using tracker-sparql. It tells me: Could not run update, constraint failed And I have no idea why it tells me that. But I could reproduce the problem, and it seems that the tracker database is not in a correct state. I modified the data I'll show, they are private email addresses. First, Here is the request that fails (same message as above): INSERT { <mailto:bob company tld> a nco:EmailAddress ; nco:emailAddress "bob company tld" . } If I change the e-mail address, I don't have any error And when I did query tracker for all email addresses, I got: SELECT ?x nco:emailAddress(?x) WHERE { ?x a nco:EmailAddress . } Results: 89 mailto:toto gap com, toto gap com mailto:toto customer com, toto customer com ... mailto:foo customer com, foo customer com , mailto:joe customer com, joe customer com mailto:me nowhere com, me nowhere com , mailto:out of ideas, out of ideas , charles titi com mailto:another_list mailing com, another_list mailing com , bob company tld ... What I find strange is the empty results. The results where (?x = <>). And one of those results is with the e-mail address that causes the error. I tried to list those strange objects using: SELECT ?x nco:emailAddress(?x) WHERE { ?x a nco:EmailAddress . FILTER (?x = <>) } Results: 0 So, those objects aren't empty, but their uri aren't shown either. I don't understand. But I could reproduce the same error with an empty uri: INSERT { <> a nco:EmailAddress ; nco:emailAddress "toto foo tld" . } SELECT ?x nco:emailAddress(?x) WHERE { ?x a nco:EmailAddress . FILTER (?x = <>) } Result: 1 , toto foo tld INSERT { <mailto:toto foo tld> a nco:EmailAddress ; nco:emailAddress "toto foo tld" . } Could not run update, constraint failed I tried to manually remove the unwanted objects. For the test-case it's easy: DELETE { ?s nco:emailAddress ?o . } WHERE { ?s a nco:EmailAddress ; nco:emailAddress ?o . FILTER (?s = <>) . } But i can't do that for the corrupted objects that don't show an URI but don't show when I filter by null uri: DELETE { ?x nco:emailAddress "bob company tld" . } WHERE { ?x a nco:EmailAddress ; nco:emailAddress "bob company tld" . } Could not run update: syntax error, use of undefined variable `x' (The same request works for a normal e-mail address) Can I do something to fix my database? I also think that tracker should prevent inserting bogus objects like that. Thanks. Mildred -- Mildred Ki'Lya ââââââââââ ïïïïïïïïïïïïïïïïïïïï ââââââââââ â Jabber, GoogleTalk: <mildred jabber fr> â Website: <http://ki.lya.online.fr> GPG ID: 9A7D 2E2B â Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
Attachment:
0x9A7D2E2B.asc
Description: application/pgp-keys