diff options
author | Don Sanders <don.sanders@nokia.com> | 2012-03-20 17:51:14 +0200 |
---|---|---|
committer | Don Sanders <don.sanders@nokia.com> | 2012-03-20 17:51:14 +0200 |
commit | 1793d291ce6722d0d544dcd82fa2f297aea84781 (patch) | |
tree | 2e75f4e111bd89a75d0a35805f698e59baf29646 | |
parent | 50b3559fc9cb63408d067286db91a692bdca097e (diff) |
Fix mail retrieval bug, suspected regression introduced by conversation code.
Symptom of bug was a mail was not being retrieved and the imap
plugin was complaining:
'WARNING server contains uids in contiguous region not on client!!!'
and mail store was complaining:
[26407] Mar 20 13:57:07 [Debug] IMAP : "1" RECV: * 15663 FETCH (UID 15663 RFC822.SIZE 5818 RFC822.HEADER {4691}
[26407] Mar 20 13:57:07 [Debug] IMAP : "1" RECV: <4691 literal bytes received>
[26407] Mar 20 13:57:07 [Debug] IMAP : "1" RECV: INTERNALDATE "15-Mar-2012 16:27:18 +0000" FLAGS () BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 1083 43 NIL NIL NIL))
[26407] Mar 20 13:57:07 [Warning] ( 26407 ) Failed to execute query; error:"columns id, identifier are not unique Unable to fetch row"; statement:"INSERT INTO missingmessages (id,identifier,level) VALUES (14256,'E1S7pqR-0005Rd-UZ@pluto.milchstrasse.xx',0)"
[26407] Mar 20 13:57:07 [Warning] Failed to execute query; error:"columns id, identifier are not unique Unable to fetch row"; statement:"INSERT INTO missingmessages (id,identifier,level) VALUES (14256,'E1S7pqR-0005Rd-UZ@pluto.milchstrasse.xx',0)"
[26407] Mar 20 13:57:07 [Warning] Could not execute query "addMessage missingmessages insert query"
[26407] Mar 20 13:57:07 [Warning] 26407 Unable to addMessages - constraint failure
Basically in addMessages, messagePredecessors was being called
and was returning a missingReferences list with duplicate entries.
This then resulted in the 'if (!missingReferences.isEmpty())'
clause in addMessages performing a batch query trying to insert
multiple rows into the missingmessages table with the same
(id, identifier) pairs which broke the primary key constraint
of the missingmessages table.
Solution is to have the messagePredecessors function removeDuplicates in
missingReferences list.
-rw-r--r-- | src/libraries/qmfclient/qmailstore_p.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libraries/qmfclient/qmailstore_p.cpp b/src/libraries/qmfclient/qmailstore_p.cpp index 035ca67a..d10ff798 100644 --- a/src/libraries/qmfclient/qmailstore_p.cpp +++ b/src/libraries/qmfclient/qmailstore_p.cpp @@ -8246,6 +8246,7 @@ QMailStorePrivate::AttemptResult QMailStorePrivate::messagePredecessor(QMailMess metaData->setResponseType(QMailMessageMetaData::UnspecifiedResponse); } } + missingReferences->removeDuplicates(); return Success; } |