Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D2A64078 for ; Wed, 29 Jun 2011 18:12:56 +0000 (UTC) Received: (qmail 77672 invoked by uid 500); 29 Jun 2011 18:12:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 77635 invoked by uid 500); 29 Jun 2011 18:12:55 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 77628 invoked by uid 99); 29 Jun 2011 18:12:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 18:12:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 18:12:54 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8249E439FA9 for ; Wed, 29 Jun 2011 18:12:34 +0000 (UTC) Date: Wed, 29 Jun 2011 18:12:34 +0000 (UTC) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Message-ID: <1698413945.3229.1309371154530.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <790802027.29851.1308762407377.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-5292) SQLAuthorisation and views MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dag H. Wanvik updated DERBY-5292: --------------------------------- Issue & fix info: [Repro attached] Bug behavior facts: [Deviation from standard, Security, Seen in production] > SQLAuthorisation and views > -------------------------- > > Key: DERBY-5292 > URL: https://issues.apache.org/jira/browse/DERBY-5292 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.7.1.1 > Environment: windows xp > Reporter: Thomas Hill > Attachments: output.txt, script.txt > > > Hi, > in some cases there seem to be issues with SQLAuthorisation in conjunction with database VIEWS. > Please see attached files as repro (script.txt has only the SQL I executed, output is the output resulting when running the script). > I would think identical results should be returned in all cases and independent on how the view has been defined, but this to my surprise not being the case: > 1) Trying to select from view appl."VW_MyTasks" - which is a simple view defined on just one table - leads to expected results, i.e. "my" tasks are being returned. > 2) Trying to select from view appl."VW_MyPriorityTasks - which is a view defined on two joined tables without using an inner join clause - leads to expected results, i.e. "my" priority tasks are being returned. > 3) Trying to select from view appl."VW2_MyPriorityTasks - which is the same view but now the two tables joined using an inner join clause - leads to an error and no tasks returned (when the same results as in 2) above were expected). > 4) Trying to select from view appl."VW3_MyPriorityTasks" - which is a view defined using a subselect - also unexpectedly leads to an error. > Note: While I could rewrite each inner join clause with changing the syntax like in 2) above, this provides a simple work-around for such cases. May be there is a work-around for subselects also (not sure if every subselect could be rewritten to a join?). However when depending on using EXISTS constructs in the query there unfortunately is no way (I would know of) to get around this problem. Unfortuanetly a view that makes use of EXISTS is also one I would need to define in my data base... > Thanks -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira