Discussion:
database error with akonadictl fsck
Dominique Dumont
2018-10-15 09:41:45 UTC
Permalink
Hi

akonadictl fsck shows quite a lot of the following error message:

org.kde.pim.akonadiserver: DATABASE ERROR:
org.kde.pim.akonadiserver: Error code: "1064"
org.kde.pim.akonadiserver: DB error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND PartTable.storage = 1 )' at line 1"
org.kde.pim.akonadiserver: Error text: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND PartTable.storage = 1 )' at line 1 QMYSQL: Unable to execute query"
org.kde.pim.akonadiserver: Query: "SELECT PartTable.id, PartTable.pimItemId, PartTable.partTypeId, PartTable.data, PartTable.datasize, PartTable.version, PartTable.storage FROM PartTable WHERE ( PartTable.pimItemId IN ( ) AND PartTable.storage = :0 )"
Found duplicates 9048

How can I fix this error ?

Kontact is version 5.9.1 on Debian unstable.

All the best

Dod
Paul Vixie
2018-10-15 12:44:30 UTC
Permalink
from time to time you have to burn down your kontact database and
reinitialize it. your error below is a sign of such times.

1. stop kontact/kmail/etc.
2. stop akonadi.
3. remove (recursively) ~/.local/share/akonadi/*

note, at this point you will have no e-mail cached locally, and all your
internal folder settings (trash, sent-mail, favorites) are gone.

4. start kontact/kmail/etc which will start akonadi. let it settle.
5. go into account settings. fix your trash, sent-mail, other folders.
6. decide what you want for favorite folders and restore those.

i do it twice a month. probably i should write a script for it.

also note, there's a way to use postgres instead of mysql, and while it
is faster in general, it doesn't self-corrupt less often. so, i tried
it, but it didn't really help, so i gave it up.

vixie
Post by Dominique Dumont
Hi
org.kde.pim.akonadiserver: Error code: "1064"
org.kde.pim.akonadiserver: DB error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND PartTable.storage = 1 )' at line 1"
org.kde.pim.akonadiserver: Error text: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND PartTable.storage = 1 )' at line 1 QMYSQL: Unable to execute query"
org.kde.pim.akonadiserver: Query: "SELECT PartTable.id, PartTable.pimItemId, PartTable.partTypeId, PartTable.data, PartTable.datasize, PartTable.version, PartTable.storage FROM PartTable WHERE ( PartTable.pimItemId IN ( ) AND PartTable.storage = :0 )"
Found duplicates 9048
How can I fix this error ?
Kontact is version 5.9.1 on Debian unstable.
All the best
Dod
--
P Vixie
Dominique Dumont
2018-10-16 09:33:29 UTC
Permalink
Post by Paul Vixie
from time to time you have to burn down your kontact database and
reinitialize it. your error below is a sign of such times.
Yes. Deleting akonadi db did indeed fix this problem.

Thanks for the detailed instructions.

All the best

Dod
Daniel Vrátil
2018-10-22 11:06:16 UTC
Permalink
Post by Dominique Dumont
Hi
org.kde.pim.akonadiserver: Error code: "1064"
org.kde.pim.akonadiserver: DB error: "You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near ') AND PartTable.storage = 1 )' at line 1"
org.kde.pim.akonadiserver: Error text: "You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near ') AND PartTable.storage = 1 )' at line 1
"SELECT PartTable.id, PartTable.pimItemId, PartTable.partTypeId,
PartTable.data, PartTable.datasize, PartTable.version, PartTable.storage
FROM PartTable WHERE ( PartTable.pimItemId IN ( ) AND PartTable.storage =
:0 )" Found duplicates 9048
How can I fix this error ?
I fixed the bad SQL code for next bugfix release (5.9.3).


Cheers,
Daniel
Post by Dominique Dumont
Kontact is version 5.9.1 on Debian unstable.
All the best
Dod
--
Daniel Vrátil
www.dvratil.cz | ***@kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)

GPG Key: 0x4D69557AECB13683
Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683
Dominique Dumont
2018-10-23 06:37:39 UTC
Permalink
Post by Daniel Vrátil
Post by Dominique Dumont
How can I fix this error ?
I fixed the bad SQL code for next bugfix release (5.9.3).
Thanks. That's good news because this issue pops up several times per
day now.

All the best

Dod

Loading...