db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1589) CREATE TABLE throws NullPointerException in Derby SQL Standard Authorization after DROPs and REVOKES
Date Thu, 14 Sep 2006 15:47:23 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1589?page=comments#action_12434716 ] 
            
Mamta A. Satoor commented on DERBY-1589:
----------------------------------------

Bryan, I tried the following ij session (which is similar to the problem script except that
there are no grant revoke statements involved) with connection authorization (ie using the
old scheme of authorization in Derby) and didn't get a null pointer exception. So, this null
pointer exception is specifc to SQL authorization mode only.

$ java org.apache.derby.tools.ij
ij version 10.3
ij> connect 'jdbc:derby:c:/dellater/dbmaintest2;create=true' user 'mamta1' as mamta1;
ij> create table t11ConstraintTest (c111 int not null, c112 int not null, primary key (c111,
c112));
0 rows inserted/updated/deleted
ij> connect 'jdbc:derby:c:/dellater/dbmaintest2;create=true' user 'mamta3' as mamta3;
WARNING 01J01: Database 'c:/dellater/dbmaintest2' not created, connection made to existing
database instead.
ij(MAMTA3)> drop table t31ConstraintTest;
ERROR 42Y07: Schema 'MAMTA3' does not exist
ij(MAMTA3)> create table t31ConstraintTest (c311 int, c312 int, foreign key(c311, c312)
references mamta1.t11ConstraintTest);
0 rows inserted/updated/deleted
ij(MAMTA3)> drop table t31ConstraintTest;
0 rows inserted/updated/deleted
ij(MAMTA3)> set connection mamta1;
ij(MAMTA1)> drop table t11ConstraintTest;
0 rows inserted/updated/deleted
ij(MAMTA1)> create table t11ConstraintTest (c111 int not null, c112 int not null, primary
key (c111, c112));
0 rows inserted/updated/deleted
ij(MAMTA1)> set connection mamta3;
ij(MAMTA3)> drop table t31ConstraintTest;
ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T31CONSTRAINTTEST' because it does not exist.
ij(MAMTA3)> create table t31ConstraintTest (c311 int, c312 int, foreign key(c311, c312)
references mamta1.t11ConstraintTest);
0 rows inserted/updated/deleted
ij(MAMTA3)> exit;

> CREATE TABLE throws NullPointerException in Derby SQL Standard Authorization after DROPs
and REVOKES
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1589
>                 URL: http://issues.apache.org/jira/browse/DERBY-1589
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Bryan Pendleton
>             Fix For: 10.2.1.0
>
>
> Currently, the last sql statement in following set of sql statements will raise a null
pointer exception
> connect 'jdbc:derby:c:/dellater/dbmaintest2;create=true' user 'mamta1' as mamta1;
> create table t11ConstraintTest (c111 int not null, c112 int not null, primary key (c111,
c112));
> grant references on t11ConstraintTest to mamta3;
> connect 'jdbc:derby:c:/dellater/dbmaintest2;create=true' user 'mamta3' as mamta3;
> drop table t31ConstraintTest;
> -- the following statement should remember that it depends on REFERENCES privilege on
mamta1.t11ConstraintTest
> create table t31ConstraintTest (c311 int, c312 int, foreign key(c311, c312) references
mamta1.t11ConstraintTest);
> drop table t31ConstraintTest;
> set connection mamta1;
> -- following should revoke all the privileges granted on it
> drop table t11ConstraintTest;
> create table t11ConstraintTest (c111 int not null, c112 int not null, primary key (c111,
c112));
> grant references(c111) on t11ConstraintTest to mamta3;
> grant references(c112) on t11ConstraintTest to PUBLIC;
> --connect 'jdbc:derby:c:/dellater/dbmaintest2;create=true' user 'mamta3' as mamta3;
> set connection mamta3;
> drop table t31ConstraintTest;
> -- following sql should recompie itself because the earlier plan depended on a privilege
which doesn't
> -- exist anymore. Instead, new privileges have been granted and the plan for following
statement should depend
> -- on those new privileges
> create table t31ConstraintTest (c311 int, c312 int, foreign key(c311, c312) references
mamta1.t11ConstraintTest); 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message