The following issue has been SUBMITTED. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=869 
====================================================================== 
Reported By:                cmayo
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   869
Category:                   Command-Line programs (dbmail-users, dbmail-util)
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
target:                      
====================================================================== 
Date Submitted:             01-Jan-11 12:54 CET
Last Modified:              01-Jan-11 12:54 CET
====================================================================== 
Summary:                    dbmail-util -p reports failed when there are no
messages with purge status
Description: 
It looks to me like db_deleted_count() declares t as FALSE and never
modifies it if the query is a success. Test in do_purge_deleted() for
failure is "if (! db_deleted_count())".

Patch that demonstrates fixing db_deleted_count() for me is attached. 

Includes a couple of other changes to address these points:
- DM_EQUERY is -1 with evaluates as true?
- db_deleted_count() is wrapping db_query() in a TRY/CATCH but db_query()
itself implements a TRY/CATCH around Connection_executeQuery(). And
db_result_next() tests it has been passed a result set. So if the query
itself fails there is no exception to catch in db_deleted_count().

Probably also worth looking at do_set_deleted() and db_count_deleted() -
always returns true?
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
01-Jan-11 12:54  cmayo          New Issue                                    
01-Jan-11 12:54  cmayo          File Added: dbmail-3.0.0_rc1-purge-retval.patch 
                  
======================================================================

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to