sqlAuthorization mode causes Null Pointer Exception during ALTER TABLE
----------------------------------------------------------------------
Key: DERBY-1754
URL: http://issues.apache.org/jira/browse/DERBY-1754
Project: Derby
Issue Type: Bug
Components: SQL
Affects Versions: 10.2.2.0, 10.3.0.0
Reporter: Bryan Pendleton
I'm concerned about the effect that I saw from setting
derby.database.sqlAuthorization=true in my environment.
I tried making a one line change to the properties used by the
altertable.sql test (see inline diff below), and then running
java org.apache.derbyTesting.functionTests.harness.RunTest lang/altertable.sql
The result was a horrendous diff in which the altertable test ran
for a little bit, then printed a Null Pointer Exception, then
started saying
ERROR 40XT0: An internal error was identified by RawStore module.
over and over for the rest of the test.
Below I've pasted the one-line diff that I applied, and I've also
pasted the stack trace for the Null Pointer Exception and for the
first of the subsequent 40XT0 messages.
What I'm hoping is that someone will say either:
- "that's a usage error; you can't just set that property like that", or
- "that's a bug, please file it"
By the way, this is with the current head of trunk.
thanks,
bryan
------------------------------------------------------------------------------------------
-bash-2.05b$ svn diff
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/lang/altertable_derby.properties
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/tests/lang/altertable_derby.properties
(revision 433854)
+++
java/testing/org/apache/derbyTesting/functionTests/tests/lang/altertable_derby.properties
(working copy)
@@ -2,3 +2,4 @@
# the statement cache off to ensure no trailing dependencies exist
derby.language.statementCacheSize=0
derby.locks.waitTimeout=4
+derby.database.sqlAuthorization=true
--------------------------------------------------------------------------------------------
2006-08-23 16:50:12.259 GMT Thread[main,5,main] (XID = 179), (SESSIONID = 0),
(DATABASE = wombat), (DRDAID = null), Failed Statement is: UPDATE "APP"."T0"
SET "C2" = 0
java.lang.NullPointerException
at
org.apache.derby.impl.sql.compile.CompilerContextImpl.addRequiredColumnPriv(CompilerContextImpl.java:742)
at
org.apache.derby.impl.sql.compile.ResultColumn.bindResultColumnByName(ResultColumn.java:683)
at
org.apache.derby.impl.sql.compile.ResultColumnList.bindResultColumnsByName(ResultColumnList.java:636)
at
org.apache.derby.impl.sql.compile.ResultSetNode.bindResultColumns(ResultSetNode.java:683)
at
org.apache.derby.impl.sql.compile.SelectNode.bindResultColumns(SelectNode.java:752)
at
org.apache.derby.impl.sql.compile.UpdateNode.bind(UpdateNode.java:349)
at
org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:345)
at
org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:111)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:723)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.executeUpdate(AlterTableConstantAction.java:2052)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.updateNewColumnToDefault(AlterTableConstantAction.java:2047)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.addNewColumnToTable(AlterTableConstantAction.java:646)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.execGuts(AlterTableConstantAction.java:398)
at
org.apache.derby.impl.sql.execute.AlterTableConstantAction.executeConstantAction(AlterTableConstantAction.java:295)
at
org.apache.derby.impl.sql.execute.MiscResultSet.open(MiscResultSet.java:57)
at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:358)
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.Main14.main(Main14.java:56)
at org.apache.derby.tools.ij.main(ij.java:71)
------------------------------------------------------------------------------------------------
2006-08-23 16:50:12.270 GMT Thread[main,5,main] (XID = 179), (SESSIONID = 0),
(DATABASE = wombat), (DRDAID = null), Failed Statement is: -- add a unique
column constraint to a table with > 1 row
alter table t3 add column c2 int not null default 0 unique
ERROR 40XT0: An internal error was identified by RawStore module.
at
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:295)
at
org.apache.derby.impl.store.raw.xact.Xact.setActiveState(Xact.java:1773)
at
org.apache.derby.impl.store.raw.xact.Xact.openContainer(Xact.java:1272)
at
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(OpenConglomerate.java:866)
at org.apache.derby.impl.store.access.heap.Heap.open(Heap.java:615)
at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(RAMTransaction.java:479)
at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(RAMTransaction.java:1316)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndex(DataDictionaryImpl.java:7446)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.locateSchemaRow(DataDictionaryImpl.java:1547)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(DataDictionaryImpl.java:1457)
at
org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(QueryTreeNode.java:1505)
at
org.apache.derby.impl.sql.compile.DDLStatementNode.getSchemaDescriptor(DDLStatementNode.java:228)
at
org.apache.derby.impl.sql.compile.DDLStatementNode.getSchemaDescriptor(DDLStatementNode.java:207)
at
org.apache.derby.impl.sql.compile.AlterTableNode.init(AlterTableNode.java:165)
at
org.apache.derby.iapi.sql.compile.NodeFactory.getNode(NodeFactory.java:239)
at
org.apache.derby.impl.sql.compile.SQLParser.alterTableBody(SQLParser.java:14016)
at
org.apache.derby.impl.sql.compile.SQLParser.alterTableStatement(SQLParser.java:13977)
at
org.apache.derby.impl.sql.compile.SQLParser.spsAlterStatement(SQLParser.java:1943)
at
org.apache.derby.impl.sql.compile.SQLParser.StatementPart(SQLParser.java:1791)
at
org.apache.derby.impl.sql.compile.SQLParser.Statement(SQLParser.java:1703)
at
org.apache.derby.impl.sql.compile.ParserImpl.parseGoalProduction(ParserImpl.java:180)
at
org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(ParserImpl.java:151)
at
org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:311)
at
org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:119)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:714)
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.Main14.main(Main14.java:56)
at org.apache.derby.tools.ij.main(ij.java:71)
--
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