db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-4502) Can't define view against system table when SQL authorization is enabled--attempting to do so kills your connection
Date Mon, 04 Jan 2010 20:31:54 GMT
Can't define view against system table when SQL authorization is enabled--attempting to do
so kills your connection
-------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-4502
                 URL: https://issues.apache.org/jira/browse/DERBY-4502
             Project: Derby
          Issue Type: Bug
          Components: SQL
            Reporter: Rick Hillegas


Derby fails on an NPE if you try to create the following view when authorization is turned
on:

  create view v2( a ) as select tablename from sys.systables;

The NPE occurs when the dependency manager trips across a dummy permission constructed on-the-fly.
The dummy permission is created by PermissionsCacheable and is supposed to represent the implicit
grant to PUBLIC of SELECT privilege on the system table. PermissionsCacheable doesn't bother
to give the dummy permission a corresponding dummy UUID. The dependency manager falls down
when trying to deference the null UUID of the dummy permission.

The following script shows this problem:

connect 'jdbc:derby:memory:dummy;create=true;user=test_dbo;password=test_dbopassword' as test_dbo_conn;

connect 'jdbc:derby:memory:dummy;user=ruth;password=ruthpassword' as ruth_conn;

create table t( b int );


create view v1( a ) as select b from t;
create view v2( a ) as select tablename from sys.systables;


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


Mime
View raw message