Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: dev

imaptest search-date errors

 

 

DBMail dev RSS feed   Index | Next | Previous | View Threaded


talanchor at mail

Aug 1, 2013, 9:00 AM

Post #1 of 3 (46 views)
Permalink
imaptest search-date errors

Hi again :)

I would like to propose a fix to problem with search-date test.
In dbmail-mailbox.c function mailbox_search() there is date buf which is defined as char dateold[SQL_INTERNALDATE_LEN]; where SQL_INTERNALDATE_LEN == 32.
The problem is that it is not date itself that is stored in "date" buf, rather it is an sql statement, which becomes truncated as follows:

Debug:[mailbox] mailbox_search(+1211): date: TO_DATE('2007-03-24 00:00:00':

A quick fix would be to change the length of this buffer to something like 256, then the output will be:

Debug:[mailbox] mailbox_search(+1211): date: TO_DATE('2007-03-24 00:00:00'::text,'YYYY-MM-DD')

and all search-date test will pass successfully.
I hope this helps.


paul at nfg

Aug 1, 2013, 9:03 AM

Post #2 of 3 (46 views)
Permalink
Re: imaptest search-date errors [In reply to]

This was fixed in 3.1.2 already as far as I know

". ." <talanchor [at] mail> schreef:
> Hi again :)
>
>I would like to propose a fix to problem with search-date test.
>In dbmail-mailbox.c function mailbox_search() there is date buf which
>is defined as char dateold[SQL_INTERNALDATE_LEN]; where
>SQL_INTERNALDATE_LEN == 32.
>The problem is that it is not date itself that is stored in "date" buf,
>rather it is an sql statement, which becomes truncated as follows:
>
>Debug:[mailbox] mailbox_search(+1211): date: TO_DATE('2007-03-24
>00:00:00':
>
>A quick fix would be to change the length of this buffer to something
>like 256, then the output will be:
>
>Debug:[mailbox] mailbox_search(+1211): date: TO_DATE('2007-03-24
>00:00:00'::text,'YYYY-MM-DD')
>
>and all search-date test will pass successfully.
>I hope this helps.
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Dbmail-dev mailing list
>Dbmail-dev [at] dbmail
>http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

--
Verzonden van mijn Android telefoon met K-9 Mail.


talanchor at mail

Aug 2, 2013, 4:19 AM

Post #3 of 3 (38 views)
Permalink
Re: imaptest search-date errors [In reply to]

I've checked out the latest version from github repository and it has these search-date errors.
Here are those places in the source code:
https://github.com/pjstevns/dbmail/blob/master/src/dbmail-mailbox.c#L1199
https://github.com/pjstevns/dbmail/blob/master/src/dbmail-mailbox.c#L1208


Четверг, 1 августа 2013, 18:03 +02:00 от Paul J Stevens <paul [at] nfg>:
>This was fixed in 3.1.2 already as far as I know
>
>". ." <talanchor [at] mail> schreef: Hi again :)
>>
>>I would like to propose a fix to problem with search-date test.
>>In dbmail-mailbox.c function mailbox_search() there is date buf which is defined as char dateold[SQL_INTERNALDATE_LEN]; where SQL_INTERNALDATE_LEN == 32.
>>The problem is that it is not date itself that is stored in "date" buf, rather it is an sql statement, which becomes truncated as follows:
>>
>>Debug:[mailbox] mailbox_search(+1211): date: TO_DATE('2007-03-24 00:00:00':
>>
>>A quick fix would be to change the length of this buffer to something like 256, then the output will be:
>>
>>Debug:[mailbox] mailbox_search(+1211): date: TO_DATE('2007-03-24 00:00:00'::text,'YYYY-MM-DD')
>>
>>and all search-date test will pass successfully.
>>I hope this helps.
>>
>>----------------------------------------------------------------------
>>
>>Dbmail-dev mailing list
>>Dbmail-dev [at] dbmail
>>http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
>
>--
>Verzonden van mijn Android telefoon met K-9 Mail.

--
. .

DBMail dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.