>
> No, I broke it!
>
> Please makes sure that you can select mailboxes on the latest SVN. The
> lower(name) was broken code and the mailbox column should be binary. I
> think I fixed it with a new regexp match.
>
> The issue is that a mailbox name has *mixed* case sensitivity:
> Peace/&BekF3AXVBd0-
> ^^^^^  ^^^^^^^^^^^
>  \      \_ case sensitive
>   \_ not case sensitive
>
> Aaron

Yes :)

I see incorrect message list in revision-2158
But when I run revision-2155 all OK !!!

From logs:

COMMAND: [11 SELECT "SENT"]

arg[0]: 'SENT'

imap4.c,IMAPClientHandler: Executing command select...

db.c,db_findmailbox: looking for mailbox with FQN [SENT].
dbmysql.c,db_query: query [SELECT mailbox_idnr FROM dbmail_mailboxes WHERE 
BINARY name REGEXP '[sS][eE][nN][tT]' AND owner_idnr='2']
db.c,db_acl_has_right: checking ACL [read_flag] for user [2] on mailbox [42]
dbmysql.c,db_query: query [SELECT owner_idnr FROM dbmail_mailboxes WHERE 
mailbox_idnr = '42']
db.c, db_acl_has_right: mailbox [42] is owned by user [2], is that also [2]?
db.c, db_acl_has_right: mailbox [42] is owned by user [2], giving all rights

BUT! :

mysql> SELECT mailbox_idnr,name FROM dbmail_mailboxes WHERE BINARY name 
REGEXP '[sS][eE][nN][tT]' AND owner_idnr='2';
+--------------+----------------+
| mailbox_idnr | name           |
+--------------+----------------+
|           42 | 2005sent       |
|            3 | SENT           |
|           16 | Sent1          |
|           50 | mail/sent-mail |
|           69 | sent-mail      |
+--------------+----------------+

Instead of SENT (mailbox_idnr=3) I see messages from 2005sent 
(mailbox_idnr=42) folder.

May be select must be in such form:

mysql> SELECT mailbox_idnr,name FROM dbmail_mailboxes WHERE BINARY name 
REGEXP '^[sS][eE][nN][tT]$' AND owner_idnr='2';
+--------------+------+
| mailbox_idnr | name |
+--------------+------+
|            3 | SENT |
+--------------+------+


-- 
Oleg Lapshin

PS. but now I revert to revision-2155 ;)

Reply via email to