From server-dev-return-38757-apmail-james-server-dev-archive=james.apache.org@james.apache.org Fri Jul 30 11:55:46 2010 Return-Path: Delivered-To: apmail-james-server-dev-archive@www.apache.org Received: (qmail 59025 invoked from network); 30 Jul 2010 11:55:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jul 2010 11:55:46 -0000 Received: (qmail 44483 invoked by uid 500); 30 Jul 2010 11:55:45 -0000 Delivered-To: apmail-james-server-dev-archive@james.apache.org Received: (qmail 44167 invoked by uid 500); 30 Jul 2010 11:55:44 -0000 Mailing-List: contact server-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "James Developers List" Reply-To: "James Developers List" Delivered-To: mailing list server-dev@james.apache.org Received: (qmail 44129 invoked by uid 99); 30 Jul 2010 11:55:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 11:55:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 11:55:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6UBtGMQ026509 for ; Fri, 30 Jul 2010 11:55:16 GMT Message-ID: <14131538.86601280490916796.JavaMail.jira@thor> Date: Fri, 30 Jul 2010 07:55:16 -0400 (EDT) From: "Eric Charles (JIRA)" To: server-dev@james.apache.org Subject: [jira] Assigned: (JAMES-880) bug with sql query for postgresql jdbc driver In-Reply-To: <1283604892.1226889891485.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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