06ff86fc92a789e9239dccbb4300f7994ee8842e |
|
23-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix sorting mails with the same primary sort key
The sorting order may have been wrong when there was a combination of:
* Messages were sorted by a string (e.g. Subject)
* Some messages had the same sort key (e.g. same base subject)
* Within the messages with the same sort key, some of the messages already
had the "sort-*" index number in Dovecot indexes, but some of them
didn't.
The result was that Dovecot found that the two messages had exactly the same
sort key. It should have continued with the secondary sort key (e.g.
message sequence number), but it didn't. |