After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 582494 - Unread count in database not consistend
Unread count in database not consistend
Status: RESOLVED DUPLICATE of bug 577542
Product: evolution
Classification: Applications
Component: Mailer
2.26.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[disk-summary]
Depends on:
Blocks:
 
 
Reported: 2009-05-13 16:29 UTC by Daniel van Eeden
Modified: 2010-03-26 17:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Daniel van Eeden 2009-05-13 16:29:15 UTC
Please describe the problem:
I'm using Evolution 2.26.1-0ubuntu1 on Ubuntu 9.04 as IMAP client. The IMAP server runs Courier IMAP on Debian.

The unread_count in the database is often not in sync with the server and the state on disk.

An example:
$ sqlite3 folders.db
SQLite version 3.6.10
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .headers ON
sqlite> .mode line folders
sqlite> SELECT * FROM folders WHERE folder_name='INBOX/mysql';
  folder_name = INBOX/mysql
      version = 14.0
        flags = 0
      nextuid = 0
         time = 0
  saved_count = 2
 unread_count = 2
deleted_count = 0
   junk_count = 0
visible_count = 2
    jnd_count = 0
        bdata = 3 1239302115
sqlite> .quit
$ cd folders/INBOX/subfolders/mysql
$ ls -l
total 4
-rw-r--r-- 1 dveeden dveeden 183 2009-05-13 17:24 cmeta
-rw-r--r-- 1 dveeden dveeden 0 2009-05-13 17:27 journal
$

The GUI shows this:
folders: "mysql(2)"
message list: "There are no messages in this folder"

The server:
$ cd Maildir/.mysql/
$ find .
.
./tmp
./new
./cur
./maildirfolder
./courierimapacl
./courierimapuiddb
./courierimapkeywords
$

1. The GUI should update the database if the message count in the database is not 0 and there are no messages in the folder to display.

This happens mostly when I delete (but not expunge) mail using Evolution, then expunge using some other application.

It does not update when I click refresh in the context menu of the folder. Connect/Disconnect also doesn't solve the issue.

It does update when I receive new mail in that folder.

Steps to reproduce:


To reproduce:

1. evolution --force-shutdown
2. sqlite3 /path/to/folders.db
3. UPDATE folders SET unread_count='100' WHERE folder_name='Some/Foldername';
4. Start evolution
5. New mail count is wrong
6. Send email to that mailbox to fix.

Actual results:


Expected results:


Does this happen every time?
Yes, I'm able to reproduce it.

Other information:
Comment 1 Srinivasa Ragavan 2009-05-15 08:24:25 UTC
You definitely shouldn't touch the disk numbers. Infact, the visible count is the most closer one to what you see, specially junk can be unread. Anyways, lemme try your approach and see how to take care.
Comment 2 Milan Crha 2010-03-26 17:24:41 UTC

*** This bug has been marked as a duplicate of bug 577542 ***