[Akonadi] [Bug 338658] GMail, Novell Groupwise, other IMAP: "Multiple merge candidates, aborting"

Stephan Diestelhorst via KDE Bugzilla bugzilla_noreply at kde.org
Fri Jun 10 21:28:11 BST 2016


https://bugs.kde.org/show_bug.cgi?id=338658

--- Comment #54 from Stephan Diestelhorst <stephan.diestelhorst at gmail.com> ---
For me mysql complained about "You can't specify target for update in FROM
clause".  Wrapping things into another layer of SELECT did the trick:

DELETE FROM pimitemtable WHERE pimitemtable.id in (
  SELECT id FROM (
    SELECT id FROM pimitemtable
    LEFT OUTER JOIN (
      SELECT MIN(pimitemtable.id) as RowId, pimitemtable.remoteId,
pimitemtable.collectionId FROM pimitemtable GROUP by pimitemtable.remoteId,
pimitemtable.collectionId )
    as KeepRows ON pimitemtable.id = KeepRows.RowId
    WHERE KeepRows.RowId IS NULL)
  AS foo)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.



More information about the Kdepim-bugs mailing list