The following issue has been UPDATED. 
====================================================================== 
http://dbmail.org/mantis/view.php?id=512 
====================================================================== 
Reported By:                bjohnson
Assigned To:                aaron
====================================================================== 
Project:                    DBMail
Issue ID:                   512
Category:                   Database layer
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     resolved
target:                      
Resolution:                 fixed
Fixed in Version:           2.2.4
====================================================================== 
Date Submitted:             25-Feb-07 10:57 CET
Last Modified:              06-Mar-07 07:09 CET
====================================================================== 
Summary:                    IMAP SEARCH LARGER and SEARCH SMALLER cause query
error, return incorrect results
Description: 
Have some of these in my log file:

Feb 22 19:55:16 mailhost dbmail/imap4d[11895]: Error [You have an error in
your SQ
L syntax; check the manual that corresponds to your MySQL server version
for the
 right syntax to use near 'ORDER BY message_idnr' at line 1] [SELECT
message_idn
r FROM dbmail_messages WHERE mailbox_idnr = 1 AND status IN (0,1) AND 
ORDER BY 
message_idnr]
Feb 22 19:55:16 mailhost dbmail/imap4d[11895]: Error could not execute
query


====================================================================== 

---------------------------------------------------------------------- 
 paul - 25-Feb-07 11:17  
---------------------------------------------------------------------- 
I can't fix this without seeing the SEARCH or SORT command that precedes
this error. 

---------------------------------------------------------------------- 
 bjohnson - 25-Feb-07 11:26  
---------------------------------------------------------------------- 
Unfortunately, I was running at the lowest log level because I haven't had
any recent issues.  There were three of these logged over the last week. 
I have no idea how to reproduce it.

I'll turn of the log level and see if I can get anymore. 

---------------------------------------------------------------------- 
 bjohnson - 25-Feb-07 11:27  
---------------------------------------------------------------------- 
This server has very little memory and cpu power.  What is the least amount
of logging that I can do and still capture the information that you need? 
I have it set to 5 right now, but I'm sure the people who use it are going
to complain about how slow it is now :) 

---------------------------------------------------------------------- 
 paul - 25-Feb-07 19:30  
---------------------------------------------------------------------- 
imap commands are logged at level=4 

---------------------------------------------------------------------- 
 aaron - 06-Mar-07 07:09  
---------------------------------------------------------------------- 
This is the default case query in dbmail-messages.c, mailbox_search(), and
the query error is because s->search is "". So The question is, how'd that
happen?

A01 LOGIN test test
A02 SELECT INBOX
A03 SEARCH LARGER 100
A04 SEARCH SMALLER 200

...and check the logs. I checked the other search types, and they work
swimmingly. It's just LARGER and SMALLER that are not handled. Now in SVN. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
25-Feb-07 10:57 bjohnson       New Issue                                    
25-Feb-07 11:17 paul           Note Added: 0001833                          
25-Feb-07 11:26 bjohnson       Note Added: 0001834                          
25-Feb-07 11:27 bjohnson       Note Added: 0001835                          
25-Feb-07 19:30 paul           Note Added: 0001836                          
06-Mar-07 07:09 aaron          Status                   new => resolved     
06-Mar-07 07:09 aaron          Fixed in Version          => 2.2.4           
06-Mar-07 07:09 aaron          Resolution               open => fixed       
06-Mar-07 07:09 aaron          Assigned To               => aaron           
06-Mar-07 07:09 aaron          Note Added: 0001869                          
06-Mar-07 07:09 aaron          Summary                  error in SQL syntax =>
IMAP SEARCH LARGER and SEARCH SMALLER cause query error, return incorrect
results
======================================================================

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to