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:[email protected]> a nco:EmailAddress ;
        nco:emailAddress "[email protected]" .
    }

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:[email protected], [email protected]
      mailto:[email protected], [email protected]
      ...
      mailto:[email protected], [email protected]
      ,
      mailto:[email protected], [email protected]
      mailto:[email protected], [email protected]
      ,
      mailto:[email protected], [email protected]
      , [email protected]
      mailto:[email protected], [email protected]
      , [email protected]
      ...

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 "[email protected]" . }

    SELECT ?x nco:emailAddress(?x)
    WHERE { ?x a nco:EmailAddress . FILTER (?x = <>) }

    Result: 1
      , [email protected]

    INSERT {
      <mailto:[email protected]> a nco:EmailAddress ;
        nco:emailAddress "[email protected]" .
    }

    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 "[email protected]" . }
    WHERE  { ?x a nco:EmailAddress ;
                nco:emailAddress "[email protected]" . }

    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
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <[email protected]>
│ 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

_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to