Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 48881 invoked from network); 18 Nov 2008 21:32:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Nov 2008 21:32:35 -0000 Received: (qmail 90678 invoked by uid 500); 18 Nov 2008 21:32:43 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 90655 invoked by uid 500); 18 Nov 2008 21:32:43 -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 90644 invoked by uid 99); 18 Nov 2008 21:32:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 13:32:43 -0800 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 21:31:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4CEAB234C287 for ; Tue, 18 Nov 2008 13:31:44 -0800 (PST) Message-ID: <2140335049.1227043904314.JavaMail.jira@brutus> Date: Tue, 18 Nov 2008 13:31:44 -0800 (PST) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-3953) VIEWS which invoke user-coded functions may return different results depending on who SELECTs from them MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org VIEWS which invoke user-coded functions may return different results depending on who SELECTs from them ------------------------------------------------------------------------------------------------------- Key: DERBY-3953 URL: https://issues.apache.org/jira/browse/DERBY-3953 Project: Derby Issue Type: Bug Components: SQL Affects Versions: 10.4.2.0, 10.5.0.0 Reporter: Rick Hillegas This is issue to DERBY-3944 (CHECK constraints). The correct behavior seems to governed by the same clause of the SQL standard quoted on that issue. As with CHECK constraints, unqualified function names in VIEWs are being incorrectly resolved to the current schema at DML time rather than to the current schema at DDL time. The following script shows this problem: connect 'jdbc:derby:derbyauth;create=true;user=test_dbo;password=test_dbopassword' as test_dbo_conn; drop view v_fsch_1; drop function f_fsch_1; create function f_fsch_1 ( a int ) returns int language java deterministic parameter style java no sql external name 'org.apache.derbyTesting.functionTests.tests.lang.GeneratedColumnsTest.minus' ; create view v_fsch_1( a ) as values ( f_fsch_1( 1 ) ), ( f_fsch_1( 2 ) ); grant select on v_fsch_1 to public; select * from test_dbo.v_fsch_1; connect 'jdbc:derby:derbyauth;create=true;user=janet;password=janetpassword' as janet_conn; drop function f_fsch_1; create function f_fsch_1 ( a int ) returns int language java deterministic parameter style java no sql external name 'java.lang.Math.abs' ; -- -- returns different results than those seen by user test_dbo -- select * from test_dbo.v_fsch_1; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.