Derby
  1. Derby
  2. DERBY-1849

Tests lang/grantRevokeDDL.sql and lang/grantRevokeDDL2.sql fails on IBM WCTME 5.7 Foundation (jdkJ2ME Foundation Specification v1.0)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.2.2.0, 10.3.1.4
    • Component/s: Test
    • Labels:
      None
    • Environment:
      Windows

      Description

      The diff for grantRevokeDDL.sql is big, hence attaching.

      For lang/grantRevokeDDL2.sql the diff is as follows:

                      • Diff file derbyall/derbylang/grantRevokeDDL2.diff
          • Start: grantRevokeDDL2 jdkJ2ME Foundation Specification v1.0 derbyall:derbylang 2006-09-10 11:42:23 ***
            0a1
            > java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
            99 del
            < ERROR: Failed with SQLSTATE 38001
            99a100
            > ERROR: Failed with SQLSTATE XJ001
            119 del
            < ERROR: Failed with SQLSTATE 38002
            119a120
            > ERROR: Failed with SQLSTATE XJ001
            139 del
            < ERROR: Failed with SQLSTATE 38002
            139a140
            > ERROR: Failed with SQLSTATE XJ001
            158 del
            < 1 row inserted/updated/deleted
            158a159,160
            > ERROR: Failed with SQLSTATE 38000
            > ERROR: Failed with SQLSTATE XJ001
            163 del
            < 0 rows selected
            163a165,166
            > 4 |XYZ
            > 1 row selected
            168a172,182
            > ERROR: Failed with SQLSTATE 28508
            > ij(USER2)> set connection user1;
            > ij(USER1)> create trigger revoke_select_trig AFTER delete on t1
            > for each STATEMENT mode db2sql call revoke_select_proc1();
            > 0 rows inserted/updated/deleted
            > ij(USER1)> – should fail
            > delete from t1 where i = 5;
            > ERROR: Failed with SQLSTATE 38000
            > ERROR: Failed with SQLSTATE XJ001
            > ij(USER1)> – check delete failed
            > select * from t1 where i = 5;
            171,184d184
            < 1 |XYZ
            < 1 row selected
            < ij(USER2)> set connection user1;
            < ij(USER1)> create trigger revoke_select_trig AFTER delete on t1
            < for each STATEMENT mode db2sql call revoke_select_proc1();
            < 0 rows inserted/updated/deleted
            < ij(USER1)> – should fail
            < delete from t1 where i = 5;
            < ERROR: Failed with SQLSTATE 38000
            < ERROR: Failed with SQLSTATE 38001
            < ij(USER1)> – check delete failed
            < select * from t1 where i = 5;
            < I |B
            < ---------------------------
            191a192,202
            > ERROR: Failed with SQLSTATE 28508
            > ij(USER2)> set connection user1;
            > ij(USER1)> create trigger revoke_select_trig AFTER delete on t1
            > for each STATEMENT mode db2sql call revoke_select_proc2();
            > 0 rows inserted/updated/deleted
            > ij(USER1)> – should fail
            > delete from t1 where i = 6;
            > ERROR: Failed with SQLSTATE 38000
            > ERROR: Failed with SQLSTATE XJ001
            > ij(USER1)> – check delete failed
            > select * from t1 where i = 6;
            194,207d204
            < 1 |XYZ
            < 1 row selected
            < ij(USER2)> set connection user1;
            < ij(USER1)> create trigger revoke_select_trig AFTER delete on t1
            < for each STATEMENT mode db2sql call revoke_select_proc2();
            < 0 rows inserted/updated/deleted
            < ij(USER1)> – should fail
            < delete from t1 where i = 6;
            < ERROR: Failed with SQLSTATE 38000
            < ERROR: Failed with SQLSTATE 38002
            < ij(USER1)> – check delete failed
            < select * from t1 where i = 6;
            < I |B
            < ---------------------------
            214a212,222
            > ERROR: Failed with SQLSTATE 28508
            > ij(USER2)> set connection user1;
            > ij(USER1)> create trigger revoke_select_trig AFTER delete on t1
            > for each STATEMENT mode db2sql call revoke_select_proc3();
            > 0 rows inserted/updated/deleted
            > ij(USER1)> – should fail
            > delete from t1 where i = 7;
            > ERROR: Failed with SQLSTATE 38000
            > ERROR: Failed with SQLSTATE XJ001
            > ij(USER1)> – check delete failed
            > select * from t1 where i = 7;
            217,230d224
            < 1 |XYZ
            < 1 row selected
            < ij(USER2)> set connection user1;
            < ij(USER1)> create trigger revoke_select_trig AFTER delete on t1
            < for each STATEMENT mode db2sql call revoke_select_proc3();
            < 0 rows inserted/updated/deleted
            < ij(USER1)> – should fail
            < delete from t1 where i = 7;
            < ERROR: Failed with SQLSTATE 38000
            < ERROR: Failed with SQLSTATE 38002
            < ij(USER1)> – check delete failed
            < select * from t1 where i = 7;
            < I |B
            < ---------------------------
            237a232,242
            > ERROR: Failed with SQLSTATE 28508
            > ij(USER2)> set connection user1;
            > ij(USER1)> create trigger revoke_select_trig AFTER delete on t1
            > for each STATEMENT mode db2sql call revoke_select_proc4();
            > 0 rows inserted/updated/deleted
            > ij(USER1)> – ok
            > delete from t1 where i = 8;
            > ERROR: Failed with SQLSTATE 38000
            > ERROR: Failed with SQLSTATE XJ001
            > ij(USER1)> – check delete
            > select * from t1 where i = 8;
            240 del
            < 1 |XYZ
            240a245
            > 8 |XYZ
            241a247,252
            > ij(USER1)> drop trigger revoke_select_trig;
            > 0 rows inserted/updated/deleted
            > ij(USER1)> set connection user2;
            > ij(USER2)> – should fail
            > select * from user1.t1 where i = 1;
            > ERROR: Failed with SQLSTATE 28508
            243,260d253
            < ij(USER1)> create trigger revoke_select_trig AFTER delete on t1
            < for each STATEMENT mode db2sql call revoke_select_proc4();
            < 0 rows inserted/updated/deleted
            < ij(USER1)> – ok
            < delete from t1 where i = 8;
            < 1 row inserted/updated/deleted
            < ij(USER1)> – check delete
            < select * from t1 where i = 8;
            < I |B
            < ---------------------------
            < 0 rows selected
            < ij(USER1)> drop trigger revoke_select_trig;
            < 0 rows inserted/updated/deleted
            < ij(USER1)> set connection user2;
            < ij(USER2)> – should fail
            < select * from user1.t1 where i = 1;
            < ERROR: Failed with SQLSTATE 28508
            < ij(USER2)> set connection user1;
            Test Failed.
          • End: grantRevokeDDL2 jdkJ2ME Foundation Specification v1.0 derbyall:derbylang 2006-09-10 11:42:33 ***
      1. grantRevokeDDL.diff
        140 kB
        Rajesh Kartha
      2. grantRevokeDDL2.diff
        5 kB
        Rajesh Kartha

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        65d 2h 23m 1 Myrna van Lunteren 18/Nov/06 03:33
        Resolved Resolved Closed Closed
        12h 18m 1 Myrna van Lunteren 18/Nov/06 15:51
        Gavin made changes -
        Workflow jira [ 12383658 ] Default workflow, editable Closed status [ 12798337 ]
        Dag H. Wanvik made changes -
        Issue Type Test [ 6 ] Bug [ 1 ]
        Myrna van Lunteren made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Myrna van Lunteren made changes -
        Fix Version/s 10.3.0.0 [ 12310800 ]
        Myrna van Lunteren made changes -
        Fix Version/s 10.2.2.0 [ 12312027 ]
        Hide
        Myrna van Lunteren added a comment -
        Show
        Myrna van Lunteren added a comment - merged to 10.2 with http://svn.apache.org/viewvc?view=rev&revision=476541
        Myrna van Lunteren made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Myrna van Lunteren added a comment -

        committed the following change:

        r476425 | myrnavl | 2006-11-17 19:26:40 -0800 (Fri, 17 Nov 2006) | 6 lines

        DERBY-1849 - grantRevokeDDL and grantRevokeDDL2.sql fail with ibm wctme5.7_found
        ation (jdkJ2ME Spec v1.0)

        • accepting that triggers are not supported with this jvm
        • updated masters to latest syntax changes in .sql files
        • stopped NPE by adding ij.dataSource properties to grantRevokeDDL2_app.properties
        Show
        Myrna van Lunteren added a comment - committed the following change: r476425 | myrnavl | 2006-11-17 19:26:40 -0800 (Fri, 17 Nov 2006) | 6 lines DERBY-1849 - grantRevokeDDL and grantRevokeDDL2.sql fail with ibm wctme5.7_found ation (jdkJ2ME Spec v1.0) accepting that triggers are not supported with this jvm updated masters to latest syntax changes in .sql files stopped NPE by adding ij.dataSource properties to grantRevokeDDL2_app.properties
        Myrna van Lunteren made changes -
        Assignee Myrna van Lunteren [ myrna ]
        Hide
        Deepa Remesh added a comment -

        Myrna said "create Trigger fails with foundation because something in the Derby source code accessed in this statement finds a call to BigDecimal, which we should not be doing to support JSR169. So this is a problem. "

        Reference manual states triggers are not supported with JSR169. See:
        http://db.apache.org/derby/docs/dev/ref/rrefjdbcjsr169.html

        So this may be a known limitation.

        Show
        Deepa Remesh added a comment - Myrna said "create Trigger fails with foundation because something in the Derby source code accessed in this statement finds a call to BigDecimal, which we should not be doing to support JSR169. So this is a problem. " Reference manual states triggers are not supported with JSR169. See: http://db.apache.org/derby/docs/dev/ref/rrefjdbcjsr169.html So this may be a known limitation.
        Hide
        Myrna van Lunteren added a comment -

        I'm not sure I was clear in my previous comment.

        I think currently there are 2 problems with these tests:

        • NullPointerException at the start of grantRevokeDDL2 when run with foundation
          this may be a test setup issue - not sure - where some essential property is not
          set when running with DataSource only.
        • create Trigger fails with foundation because something in the Derby source code accessed in this statement finds a call to BigDecimal, which we should not be doing to support JSR169. So this is a problem.
        Show
        Myrna van Lunteren added a comment - I'm not sure I was clear in my previous comment. I think currently there are 2 problems with these tests: NullPointerException at the start of grantRevokeDDL2 when run with foundation this may be a test setup issue - not sure - where some essential property is not set when running with DataSource only. create Trigger fails with foundation because something in the Derby source code accessed in this statement finds a call to BigDecimal, which we should not be doing to support JSR169. So this is a problem.
        Hide
        Myrna van Lunteren added a comment -

        I made a mistake - picked the first reference to that trigger from derby.log. Apologies for the confusion, and thx, for the actual stack trace makes more sense to cause a problem with the foundation classes, because it uses BigDecimal somewhere:

        2006-09-28 06:49:45.019 GMT Thread[main,5,main] (XID = 1673), (SESSIONID = 9), (DATABASE = grantRevokeDDL), (DRDAID = null), Failed Statement is: – following will pass because all the required privileges are in place for mamta3
        create trigger tr31t31 after insert on t31TriggerTest for each statement mode db2sql
        insert into mamta1.t13TriggerTest values (values mamta1.selectFromSpecificSchema(1))
        java.lang.NoClassDefFoundError: java.math.BigDecimal
        at java.lang.reflect.AccessibleObject.getParameterTypesImpl(Native Method)
        at java.lang.reflect.Method.getParameterTypes(Method.java:136)
        at org.apache.derby.iapi.services.loader.ClassInspector.resolveMethod(ClassInspector.java:601)
        at org.apache.derby.iapi.services.loader.ClassInspector.findPublicMethod(ClassInspector.java:316)
        at org.apache.derby.impl.sql.compile.MethodCallNode.resolveMethodCall(MethodCallNode.java:672)
        at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(StaticMethodCallNode.java:235)
        at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(JavaToSQLValueNode.java:254)
        at org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(ResultColumn.java:580)
        at org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(ResultColumnList.java:638)
        at org.apache.derby.impl.sql.compile.RowResultSetNode.bindExpressions(RowResultSetNode.java:239)
        at org.apache.derby.impl.sql.compile.SubqueryNode.bindExpression(SubqueryNode.java:509)
        at org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(ResultColumn.java:580)
        at org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(ResultColumnList.java:638)
        at org.apache.derby.impl.sql.compile.RowResultSetNode.bindExpressions(RowResultSetNode.java:239)
        at org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(DMLStatementNode.java:249)
        at org.apache.derby.impl.sql.compile.InsertNode.bind(InsertNode.java:308)
        at org.apache.derby.impl.sql.compile.CreateTriggerNode.bind(CreateTriggerNode.java:283)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:345)
        at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:119)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:745)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:568)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517)
        at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:321)
        at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:517)
        at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:370)
        at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:268)
        at org.apache.derby.impl.tools.ij.Main.go(Main.java:204)
        at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170)
        at org.apache.derby.impl.tools.ij.Main.main(Main.java:72)
        at org.apache.derby.tools.ij.main(ij.java:67)

        Show
        Myrna van Lunteren added a comment - I made a mistake - picked the first reference to that trigger from derby.log. Apologies for the confusion, and thx, for the actual stack trace makes more sense to cause a problem with the foundation classes, because it uses BigDecimal somewhere: 2006-09-28 06:49:45.019 GMT Thread [main,5,main] (XID = 1673), (SESSIONID = 9), (DATABASE = grantRevokeDDL), (DRDAID = null), Failed Statement is: – following will pass because all the required privileges are in place for mamta3 create trigger tr31t31 after insert on t31TriggerTest for each statement mode db2sql insert into mamta1.t13TriggerTest values (values mamta1.selectFromSpecificSchema(1)) java.lang.NoClassDefFoundError: java.math.BigDecimal at java.lang.reflect.AccessibleObject.getParameterTypesImpl(Native Method) at java.lang.reflect.Method.getParameterTypes(Method.java:136) at org.apache.derby.iapi.services.loader.ClassInspector.resolveMethod(ClassInspector.java:601) at org.apache.derby.iapi.services.loader.ClassInspector.findPublicMethod(ClassInspector.java:316) at org.apache.derby.impl.sql.compile.MethodCallNode.resolveMethodCall(MethodCallNode.java:672) at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(StaticMethodCallNode.java:235) at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(JavaToSQLValueNode.java:254) at org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(ResultColumn.java:580) at org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(ResultColumnList.java:638) at org.apache.derby.impl.sql.compile.RowResultSetNode.bindExpressions(RowResultSetNode.java:239) at org.apache.derby.impl.sql.compile.SubqueryNode.bindExpression(SubqueryNode.java:509) at org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(ResultColumn.java:580) at org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(ResultColumnList.java:638) at org.apache.derby.impl.sql.compile.RowResultSetNode.bindExpressions(RowResultSetNode.java:239) at org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(DMLStatementNode.java:249) at org.apache.derby.impl.sql.compile.InsertNode.bind(InsertNode.java:308) at org.apache.derby.impl.sql.compile.CreateTriggerNode.bind(CreateTriggerNode.java:283) at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:345) at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:119) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:745) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:568) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517) at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:321) at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:517) at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:370) at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:268) at org.apache.derby.impl.tools.ij.Main.go(Main.java:204) at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170) at org.apache.derby.impl.tools.ij.Main.main(Main.java:72) at org.apache.derby.tools.ij.main(ij.java:67)
        Hide
        Mamta A. Satoor added a comment -

        I took a very quick look at couple postings from Myrna about create trigger tr31t31TriggerTest in grantRevokeDDL2.sql and as the comment ("-- following should fail because not all the privileges are in place ") before the create trigger says in the stack trace, this particular create trigger should indeed fail because all the privileges are not in place to successfully create the trigger at this point in the test.

        There might still be some genuine diffs (definitely including the NPE) that needs to be looked into for the 2 test files in question, but the particular stack trace printed by Myrna look like correct expected error.

        Show
        Mamta A. Satoor added a comment - I took a very quick look at couple postings from Myrna about create trigger tr31t31TriggerTest in grantRevokeDDL2.sql and as the comment ("-- following should fail because not all the privileges are in place ") before the create trigger says in the stack trace, this particular create trigger should indeed fail because all the privileges are not in place to successfully create the trigger at this point in the test. There might still be some genuine diffs (definitely including the NPE) that needs to be looked into for the 2 test files in question, but the particular stack trace printed by Myrna look like correct expected error.
        Hide
        Myrna van Lunteren added a comment -

        2006-09-28 06:47:03.307 GMT Thread[main,5,main] (XID = 872), (SESSIONID = 9), (DATABASE = grantRevokeDDL), (DRDAID = null), Failed Statement is: – following should fail because not all the privileges are in place
        create trigger tr31t31TriggerTest after insert on t31TriggerTest for each statement mode db2sql
        insert into t32TriggerTest values (select c111 from mamta2.v21ViewTest where c112=1)
        ERROR 28508: User 'MAMTA3' does not have select permission on column 'C111' of table 'MAMTA2'.'V21VIEWTEST'.
        at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:396)
        at org.apache.derby.iapi.sql.dictionary.StatementColumnPermission.check(StatementColumnPermission.java:127)
        at org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(GenericAuthorizer.java:159)
        at org.apache.derby.impl.sql.execute.GenericResultSetFactory.getDDLResultSet(GenericResultSetFactory.java:982)
        at org.apache.derby.impl.sql.execute.ConstantActionActivation.execute(ConstantActionActivation.java:54)
        at org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActivationHolder.java:327)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:356)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1182)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:585)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517)
        at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:321)
        at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:517)
        at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:370)
        at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:268)
        at org.apache.derby.impl.tools.ij.Main.go(Main.java:204)
        at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170)
        at org.apache.derby.impl.tools.ij.Main.main(Main.java:72)
        at org.apache.derby.tools.ij.main(ij.java:67)
        Cleanup action completed

        Show
        Myrna van Lunteren added a comment - 2006-09-28 06:47:03.307 GMT Thread [main,5,main] (XID = 872), (SESSIONID = 9), (DATABASE = grantRevokeDDL), (DRDAID = null), Failed Statement is: – following should fail because not all the privileges are in place create trigger tr31t31TriggerTest after insert on t31TriggerTest for each statement mode db2sql insert into t32TriggerTest values (select c111 from mamta2.v21ViewTest where c112=1) ERROR 28508: User 'MAMTA3' does not have select permission on column 'C111' of table 'MAMTA2'.'V21VIEWTEST'. at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:396) at org.apache.derby.iapi.sql.dictionary.StatementColumnPermission.check(StatementColumnPermission.java:127) at org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(GenericAuthorizer.java:159) at org.apache.derby.impl.sql.execute.GenericResultSetFactory.getDDLResultSet(GenericResultSetFactory.java:982) at org.apache.derby.impl.sql.execute.ConstantActionActivation.execute(ConstantActionActivation.java:54) at org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActivationHolder.java:327) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:356) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1182) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:585) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517) at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:321) at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:517) at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:370) at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:268) at org.apache.derby.impl.tools.ij.Main.go(Main.java:204) at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170) at org.apache.derby.impl.tools.ij.Main.main(Main.java:72) at org.apache.derby.tools.ij.main(ij.java:67) Cleanup action completed
        Hide
        Myrna van Lunteren added a comment -

        And grantRevokeDDL2 starts with a NPE. That can't be OK?

        Show
        Myrna van Lunteren added a comment - And grantRevokeDDL2 starts with a NPE. That can't be OK?
        Hide
        Myrna van Lunteren added a comment -

        The stack trace of that error:
        2006-09-28 06:47:03.307 GMT Thread[main,5,main] (XID = 872), (SESSIONID = 9), (DATABASE = grantRevokeDDL), (DRDAID = null), Failed Statement is: – following should fail because not all the privileges are in place
        create trigger tr31t31TriggerTest after insert on t31TriggerTest for each statement mode db2sql
        insert into t32TriggerTest values (select c111 from mamta2.v21ViewTest where c112=1)
        ERROR 28508: User 'MAMTA3' does not have select permission on column 'C111' of table 'MAMTA2'.'V21VIEWTEST'.
        at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:396)
        at org.apache.derby.iapi.sql.dictionary.StatementColumnPermission.check(StatementColumnPermission.java:127)
        at org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(GenericAuthorizer.java:159)
        at org.apache.derby.impl.sql.execute.GenericResultSetFactory.getDDLResultSet(GenericResultSetFactory.java:982)
        at org.apache.derby.impl.sql.execute.ConstantActionActivation.execute(ConstantActionActivation.java:54)
        at org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActivationHolder.java:327)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:356)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1182)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:585)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517)
        at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:321)
        at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:517)
        at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:370)
        at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:268)
        at org.apache.derby.impl.tools.ij.Main.go(Main.java:204)
        at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170)
        at org.apache.derby.impl.tools.ij.Main.main(Main.java:72)
        at org.apache.derby.tools.ij.main(ij.java:67)
        Cleanup action completed
        ---------------

        Show
        Myrna van Lunteren added a comment - The stack trace of that error: 2006-09-28 06:47:03.307 GMT Thread [main,5,main] (XID = 872), (SESSIONID = 9), (DATABASE = grantRevokeDDL), (DRDAID = null), Failed Statement is: – following should fail because not all the privileges are in place create trigger tr31t31TriggerTest after insert on t31TriggerTest for each statement mode db2sql insert into t32TriggerTest values (select c111 from mamta2.v21ViewTest where c112=1) ERROR 28508: User 'MAMTA3' does not have select permission on column 'C111' of table 'MAMTA2'.'V21VIEWTEST'. at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:396) at org.apache.derby.iapi.sql.dictionary.StatementColumnPermission.check(StatementColumnPermission.java:127) at org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(GenericAuthorizer.java:159) at org.apache.derby.impl.sql.execute.GenericResultSetFactory.getDDLResultSet(GenericResultSetFactory.java:982) at org.apache.derby.impl.sql.execute.ConstantActionActivation.execute(ConstantActionActivation.java:54) at org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActivationHolder.java:327) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:356) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1182) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:585) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517) at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:321) at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:517) at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:370) at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:268) at org.apache.derby.impl.tools.ij.Main.go(Main.java:204) at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170) at org.apache.derby.impl.tools.ij.Main.main(Main.java:72) at org.apache.derby.tools.ij.main(ij.java:67) Cleanup action completed ---------------
        Hide
        Myrna van Lunteren added a comment -

        I do not think this is a simple master update. There are some really odd diffs, for instance, the section in grantRevokeDDL.sql where a trigger tr31t31TriggerTest is created:
        -------------
        ij(MAMTA3)> – following should fail because not all the privileges are in place
        create trigger tr31t31TriggerTest after insert on t31TriggerTest for each statement mode db2sql
        insert into t32TriggerTest values (select c111 from mamta2.v21ViewTest where c112=1);
        ------------
        With foundation results in:
        ERROR: Failed with SQLSTATE 28508
        But it should just succeed.
        (this then of course causes more diffs because there is no trigger to get fired)

        There may be some other genuine problem further down, it's hard to say because of the various inter-dependencies of objects in the test.

        I wonder if the same problems would show up with just DataSource testing (i.e. irrespective of j9_foundation)?

        Show
        Myrna van Lunteren added a comment - I do not think this is a simple master update. There are some really odd diffs, for instance, the section in grantRevokeDDL.sql where a trigger tr31t31TriggerTest is created: ------------- ij(MAMTA3)> – following should fail because not all the privileges are in place create trigger tr31t31TriggerTest after insert on t31TriggerTest for each statement mode db2sql insert into t32TriggerTest values (select c111 from mamta2.v21ViewTest where c112=1); ------------ With foundation results in: ERROR: Failed with SQLSTATE 28508 But it should just succeed. (this then of course causes more diffs because there is no trigger to get fired) There may be some other genuine problem further down, it's hard to say because of the various inter-dependencies of objects in the test. I wonder if the same problems would show up with just DataSource testing (i.e. irrespective of j9_foundation)?
        Hide
        Andrew McIntyre added a comment -

        Rajesh, it looks like this is still an issue for the J2ME runs. Can you prepare a patch? It is easier to review/commit a patch for this issue than inspecting diff files.

        Show
        Andrew McIntyre added a comment - Rajesh, it looks like this is still an issue for the J2ME runs. Can you prepare a patch? It is easier to review/commit a patch for this issue than inspecting diff files.
        Rajesh Kartha made changes -
        Field Original Value New Value
        Attachment grantRevokeDDL2.diff [ 12340791 ]
        Attachment grantRevokeDDL.diff [ 12340790 ]
        Hide
        Rajesh Kartha added a comment -

        Diff files for both tests attached

        Show
        Rajesh Kartha added a comment - Diff files for both tests attached
        Rajesh Kartha created issue -

          People

          • Assignee:
            Myrna van Lunteren
            Reporter:
            Rajesh Kartha
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development