db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1707) Specifying an incorrect optimizer property (constraint=null) gives NullPointerException
Date Sun, 17 Sep 2006 03:57:23 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1707?page=all ]

Mike Matrigali updated DERBY-1707:
----------------------------------

    Fix Version/s: 10.2.1.0
                   10.3.0.0

I reviewed the simple patch, ran full set of successful tests against ibm142 jvm and committed
the 
DERBY1707ConstraintNullPropertyV1diff.txt patch to the trunk.  This should get merged into
10.2.

m3_142:160>svn commit

Sending        java\engine\org\apache\derby\impl\sql\compile\FromBaseTable.java
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\optimizerOverrides.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\optimizerOverrides.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\optimizerOverrides.out
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\lang\optimizerOverrides.sql
Transmitting file data .....
Committed revision 447011.

> Specifying an incorrect optimizer property (constraint=null) gives NullPointerException
> ---------------------------------------------------------------------------------------
>
>                 Key: DERBY-1707
>                 URL: http://issues.apache.org/jira/browse/DERBY-1707
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.0, 10.3.0.0
>            Reporter: Deepa Remesh
>         Assigned To: Mamta A. Satoor
>             Fix For: 10.2.1.0, 10.3.0.0
>
>         Attachments: DERBY1707ConstraintNullPropertyV1diff.txt, illegal_overrides.sql
>
>
> After we get the NPE, any other operation gives:
> ERROR 40XT0: An internal error was identified by RawStore module.
> Specifying constraint=null as an optimizer override is actually a usage error. I tried
this thinking it is allowed like index=null which can be used to force a table scan. But specifying
constraint=null gives a NPE and other operations give the above error. I am attaching a repro
'illegal_overrides.sql'. 
> Found this when testing with 10.2.1.0 beta. Stack traces below:
> ij> --- specifying null value for constraint gives NPE
> SELECT * FROM t1 --DERBY-PROPERTIES constraint=null
> ;
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.compile.FromBaseTable.verifyProperties(Unknown Source)
>         at org.apache.derby.impl.sql.compile.ProjectRestrictNode.verifyProperties(Unknown
Source)
>         at org.apache.derby.impl.sql.compile.FromList.verifyProperties(Unknown Source)
>         at org.apache.derby.impl.sql.compile.OptimizerImpl.<init>(Unknown Source)
>         at org.apache.derby.impl.sql.compile.Level2OptimizerImpl.<init>(Unknown
Source)
>         at org.apache.derby.impl.sql.compile.Level2OptimizerFactoryImpl.getOptimizerImpl(Unknown
Sou
> rce)
>         at org.apache.derby.impl.sql.compile.OptimizerFactoryImpl.getOptimizer(Unknown
Source)
>         at org.apache.derby.impl.sql.compile.ResultSetNode.getOptimizer(Unknown Source)
>         at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
>         at org.apache.derby.impl.sql.compile.DMLStatementNode.optimize(Unknown Source)
>         at org.apache.derby.impl.sql.compile.CursorNode.optimize(Unknown Source)
>         at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
>         at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>         at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(
> Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
>         at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
>         at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source)
>         at org.apache.derby.tools.ij.main(Unknown Source)
> ij> --- something goes wrong in validation of properties after we get the NPE
> SELECT * FROM t1 --DERBY-PROPERTIES constrant=cons1
> ;
> ERROR 40XT0: An internal error was identified by RawStore module.
> ERROR 40XT0: An internal error was identified by RawStore module.
>         at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>         at org.apache.derby.impl.store.raw.xact.Xact.setActiveState(Unknown Source)
>         at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source)
>         at org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown
Source)
>         at org.apache.derby.impl.store.access.heap.Heap.open(Unknown Source)
>         at org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
>         at org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndex(Unknown
Source
> )
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.locateSchemaRow(Unknown
Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown
Source)
>         at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown
Source)
>         at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown
Source)
>         at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown
Source)
>         at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source)
>         at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
>         at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source)
>         at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source)
>         at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
>         at org.apache.derby.impl.sql.compile.CursorNode.bind(Unknown Source)
>         at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
>         at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>         at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(
> Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
>         at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
>         at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source)
>         at org.apache.derby.tools.ij.main(Unknown Source)

-- 
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