db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (Assigned) (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (DERBY-3953) VIEWS which invoke user-coded functions may return different results depending on who SELECTs from them
Date Thu, 16 Feb 2012 00:09:01 GMT

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

Kathey Marsden reassigned DERBY-3953:
-------------------------------------

    Assignee: Rick Hillegas
    
> 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.1.1
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>             Fix For: 10.5.3.2, 10.6.2.3, 10.7.1.1
>
>
> This issue is similar 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message