I could fix the database apparently:
$ sqlite3 ~/.cache/tracker/meta.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> DELETE FROM "nco:EmailAddress"
...> WHERE "nco:emailAddress" = "bob company tld";
sqlite> .q
And now it works.
My theory about the problem is that the nco:EmailAddress existed but
wasn't referenced anywhere. It should have been garbage collected. And
thus, when I want to assign this email address to an existing
nco:Contact, tracker tried to create a new nco:EmailAddress even though
it already existed.
In the SQLite database, the nco:EmailAddress table is as follows:
CREATE TABLE "nco:EmailAddress" (
ID INTEGER NOT NULL PRIMARY KEY,
"nco:emailAddress" TEXT UNIQUE,
"nco:emailAddress:graph" INTEGER);
The nco:emailAddress is set to UNIQUE. SQLite complained and Tracker
failed to complete the transaction.
It seems my database is full of these quirks, is there a way to run a
garbage collector on it?
It seems it's just a matter of running the following request on each of
the ontology tables:
DELETE FROM "nco:EmailAddress"
WHERE ID NOT IN (SELECT ID FROM Resource);
Can someone confirm this ?
Anyway, it worked for my email addresses.
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