https://bugs.kde.org/show_bug.cgi?id=353675
--- Comment #3 from Daniel Vrátil <dvra...@kde.org> --- Git commit d54d1f241f1a421330efbf2f71efe4d1acd18f04 by Daniel Vrátil. Committed on 08/01/2017 at 15:41. Pushed by dvratil into branch 'Applications/16.12'. Search: match all results against DB first to exclude invalid results In some cases the search backend can return results that actually no longer exist in Akonadi DB (for example because the indexer is busy indexing something else while an Item was removed, which triggered search update), or because it went out-of-sync with the DB due to a bug or manual cleanup. This lead to a lots of (albeit harmless) foreign key constraint errors as we tried to insert items into CollectionPimItemRelation table which did not exist in PimItemTable. To prevent this we first match the results against PimItemTable to get only the existing Items (we need them anyway for change ntf) and then insert only those into the CollectionPimItemRelation table. This does not fix problems with search updates unfortunately. M +32 -13 src/server/search/searchmanager.cpp https://commits.kde.org/akonadi/d54d1f241f1a421330efbf2f71efe4d1acd18f04 -- You are receiving this mail because: You are the assignee for the bug.