The following issue has been RESOLVED. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=751 
====================================================================== 
Reported By:                maximP
Assigned To:                paul
====================================================================== 
Project:                    DBMail
Issue ID:                   751
Category:                   Database layer
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     resolved
Target Version:             2.3.6
target:                      
Resolution:                 no change required
Fixed in Version:           
====================================================================== 
Date Submitted:             12-Jan-09 09:30 CET
Last Modified:              16-Feb-09 17:00 CET
====================================================================== 
Summary:                    SQLException during POP3 session
Description: 
After deleting messages during the POP3 session dbmail tries to calculate
mailbox size by executing "select sum(...)". It gets one record with NULL
value and tries to convert it to int in db_result_get_u64() function. The
result is the following log message:

Error:[db] dm_quota_rebuild_user(+908): SQLException:

(Tested with PostgreSQL 8.3)

I suggest to replace sum(...) with coalesce(sum(...), 0)
The patch is attached.
====================================================================== 

---------------------------------------------------------------------- 
 (0002754) paul (administrator) - 03-Feb-09 09:24
 http://www.dbmail.org/mantis/view.php?id=751#c2754 
---------------------------------------------------------------------- 
This smells like a libzdb bug to me. I've seen it myself a couple of times.
Will investigate. 

---------------------------------------------------------------------- 
 (0002786) maximP (reporter) - 16-Feb-09 16:12
 http://www.dbmail.org/mantis/view.php?id=751#c2786 
---------------------------------------------------------------------- 
The problem has gone with libzdb 2.4, thank you, Paul, you can close this
bug. 

---------------------------------------------------------------------- 
 (0002787) paul (administrator) - 16-Feb-09 17:00
 http://www.dbmail.org/mantis/view.php?id=751#c2787 
---------------------------------------------------------------------- 
It was indeed a zdb bug. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
12-Jan-09 09:30  maximP         New Issue                                    
12-Jan-09 09:30  maximP         File Added: dm_db.c.diff                     
03-Feb-09 09:24  paul           Note Added: 0002754                          
03-Feb-09 09:24  paul           Assigned To               => paul            
03-Feb-09 09:24  paul           Status                   new => acknowledged 
16-Feb-09 16:12  maximP         Note Added: 0002786                          
16-Feb-09 17:00  paul           Note Added: 0002787                          
16-Feb-09 17:00  paul           Status                   acknowledged =>
resolved
16-Feb-09 17:00  paul           Resolution               open => no change
required
16-Feb-09 17:00  paul           Target Version            => 2.3.6           
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to