james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Charles (JIRA)" <server-...@james.apache.org>
Subject [jira] Assigned: (JAMES-880) bug with sql query for postgresql jdbc driver
Date Fri, 30 Jul 2010 11:55:16 GMT

     [ https://issues.apache.org/jira/browse/JAMES-880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Eric Charles reassigned JAMES-880:
----------------------------------

    Assignee: Eric Charles  (was: Norman Maurer)

> bug with sql query for postgresql jdbc driver
> ---------------------------------------------
>
>                 Key: JAMES-880
>                 URL: https://issues.apache.org/jira/browse/JAMES-880
>             Project: JAMES Server
>          Issue Type: Bug
>    Affects Versions: 2.3.1
>         Environment: Debian Etch. Java 1.6.0_10, 32bit. 
>            Reporter: Daniel Dettlaff
>            Assignee: Eric Charles
>            Priority: Blocker
>             Fix For: 3.0-M1
>
>   Original Estimate: 0.33h
>  Remaining Estimate: 0.33h
>
> It's BLOCKER when someone needs to get server for Virtual Users (virtual mail accounts
like in tutorial here: http://wiki.apache.org/james/VirtualUserTable )
> Problem:
> in file: JDBCVirtualUserTable.java
> line: 150
> should be:
> query = getInitParameter("sqlquery","select VirtualUserTable.target_address from VirtualUserTable,
VirtualUserTable as VUTDomains where (VirtualUserTable.user like ? or VirtualUserTable.user
like '\\\\%') and (VirtualUserTable.domain like ? or (VirtualUserTable.domain like '\\\\%'
and VUTDomains.domain like ?)) order by concat(VirtualUserTable.user,'@',VirtualUserTable.domain)
desc limit 1");
> instead of:
> query = getInitParameter("sqlquery","select VirtualUserTable.target_address from VirtualUserTable,
VirtualUserTable as VUTDomains where (VirtualUserTable.user like ? or VirtualUserTable.user
like '\\%') and (VirtualUserTable.domain like ? or (VirtualUserTable.domain like '\\%' and
VUTDomains.domain like ?)) order by concat(VirtualUserTable.user,'@',VirtualUserTable.domain)
desc limit 1");
> So.. there should be doubled \\ cause postgresql on select did not select wanted row
correctly with default ".. LIKE '\%' .." and there should be ".. LIKE '\\%' .. " statement
in query.
> After adding this fix it works perfectly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message