You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Christian d'Heureuse (JIRA)" <ji...@apache.org> on 2006/10/30 13:43:18 UTC

[jira] Created: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

NullPointerException in CREATE VIEW ... VALUES NULL;
----------------------------------------------------

                 Key: DERBY-2018
                 URL: http://issues.apache.org/jira/browse/DERBY-2018
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.2.1.6
         Environment: Java 1.5.0_06-b05
            Reporter: Christian d'Heureuse
            Priority: Minor


The following statement produces a NullPointerException:

   CREATE VIEW v1 (f1) AS VALUES NULL;

Stack trace:

----------------------------------------------------------------
2006-10-30 12:39:31.750 GMT:
 Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
on database directory C:\temp_sys\temp_Derby_TestErr_db

Database Class Loader started - derby.database.classpath=''
2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
java.lang.NullPointerException
        at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
        at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
        at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
        at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Assigned: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Yip Ng (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-2018?page=all ]

Yip Ng reassigned DERBY-2018:
-----------------------------

    Assignee: Yip Ng

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12448913 ] 
            
Bryan Pendleton commented on DERBY-2018:
----------------------------------------

The rest of my testing was uneventful. Committed the patch to subversion as revision 473603.

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Resolved: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-2018?page=all ]

Bryan Pendleton resolved DERBY-2018.
------------------------------------

    Fix Version/s: 10.3.0.0
       Resolution: Fixed
       Derby Info:   (was: [Patch Available])

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12449302 ] 
            
Bernt M. Johnsen commented on DERBY-2018:
-----------------------------------------

NOTE:

VALUES NULL; (and thus CREATE VIEW V(F) AS VALUES NULL) is not a legal SQL statment according to the SQL standard since the type is undefined. 

VALUES (CAST NULL AS INTEGER)  on the other hand is legal.


> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Yip Ng (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12449050 ] 
            
Yip Ng commented on DERBY-2018:
-------------------------------

>Christian d'Heureuse wrote:
> Why does the statement CREATE VIEW v1 (f1) AS VALUES NULL have to be forbidden? 

One reason is to stay consistent with the behavior with issuing VALUES NULL in Derby.  e.g.:

  ij> values null;
  ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.

  ij> create view v1 (c1) as values null;
  ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.

If CREATE VIEW v1 AS SELECT NULL as f1 executes successfully.  What is the data type for this 
view column?  Integer type? Character type or something else?  In any case, it is going to be an implementation defined which in my opinion is not very portable and it is better to declare this explicitly:

ij> values cast(null as integer);
1
-----------
NULL

1 row selected
ij> create view v1 (c1) as values cast(null as integer);
0 rows inserted/updated/deleted
ij> select * from v1;
C1
-----------
NULL

1 row selected

Of course, you may not agree with me.  So perhaps this issue can be further discuss in the Derby dev list to see how the community feels about it.  In any case, the current state is better than having a NPE to occur.  =)


> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Updated: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Yip Ng (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-2018?page=all ]

Yip Ng updated DERBY-2018:
--------------------------

    Attachment: derby2018-trunk-stat01.txt
                derby2018-trunk-diff01.txt

Attaching derby2018-trunk-diff01.txt.  This is a simple fix where it catches untyped null in CreateViewNode at bind phase (same logic as CursorNode) and throws the exception.
derbyall passes except for the following tests which already failed before this patch.

derbyall/derbynetclientmats/derbynetclientmats.fail:junitTests/derbyNet/CompatibilityTest.java
derbyall/derbynetclientmats/derbynetmats.fail:derbynet/ShutDownDBWhenNSShutsDownTest.junit
derbyall/derbynetmats/derbynetmats.fail:derbynet/ShutDownDBWhenNSShutsDownTest.junit 

JUnit suite passes.  

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12448870 ] 
            
Bryan Pendleton commented on DERBY-2018:
----------------------------------------

Thank you very much, Yip, that was exactly it! Now I get the results I expect: the new test fails without your code patch, and passes with your code patch. Excellent! I will proceed with my review/commit.


> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Updated: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Yip Ng (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-2018?page=all ]

Yip Ng updated DERBY-2018:
--------------------------

    Derby Info: [Patch Available]

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Christian d'Heureuse (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12449350 ] 
            
Christian d'Heureuse commented on DERBY-2018:
---------------------------------------------

Bernt M. Johnsen wrote:
> VALUES NULL ... is not a legal SQL statement 

I agree that it's not conforming SQL according to the standard.
But non-conforming SQL is allowed (it's "legal") and all DBMSs have it.

(see also my discussion with Nip in DERBY-2002)

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12448855 ] 
            
Bryan Pendleton commented on DERBY-2018:
----------------------------------------

I get this diff with or without the patch, so it's not a problem with the patch. Must be something odd in my environment.

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Christian d'Heureuse (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12449003 ] 
            
Christian d'Heureuse commented on DERBY-2018:
---------------------------------------------

Why does Derby have such problems with untyped NULL values?
Why does the statement CREATE VIEW v1 (f1) AS VALUES NULL have to be forbidden?

Other DBMS don't have such problems, e.g. in MS-SQL-Server 2000,
  CREATE VIEW v1 AS SELECT NULL as f1
is valid.

Does the problem stem from the technique used for data flow paths within Derby, because there has to be an assigned data type for each data element?

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12448852 ] 
            
Bryan Pendleton commented on DERBY-2018:
----------------------------------------

I get the following diff on lang/views.sql. I wonder if this is somehow an issue with
carriage-return/line-feed issues? I think the patch was generated on Windows and
I am trying to apply it on Linux.

java org.apache.derbyTesting.functionTests.harness.RunTest lang/views.sql
*** Start: views jdk1.4.2_11 2006-11-10 12:58:17 ***
18d17
<
74d72
<
Test Failed.
*** End:   views jdk1.4.2_11 2006-11-10 12:58:23 ***


> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Yip Ng (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12448865 ] 
            
Yip Ng commented on DERBY-2018:
-------------------------------

Hi Bryan.  It appears that the view.sql  test has been moved to JUnit.  Try:

java org.apache.derbyTesting.functionTests.tests.lang.LangScripts views

I discovered this when trying to fix DERBY-2048.



> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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

        

[jira] Commented: (DERBY-2018) NullPointerException in CREATE VIEW ... VALUES NULL;

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2018?page=comments#action_12448788 ] 
            
Bryan Pendleton commented on DERBY-2018:
----------------------------------------

This patch looks good to me. I intend to commit it this weekend.

> NullPointerException in CREATE VIEW ... VALUES NULL;
> ----------------------------------------------------
>
>                 Key: DERBY-2018
>                 URL: http://issues.apache.org/jira/browse/DERBY-2018
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6
>         Environment: Java 1.5.0_06-b05
>            Reporter: Christian d'Heureuse
>         Assigned To: Yip Ng
>            Priority: Minor
>         Attachments: derby2018-trunk-diff01.txt, derby2018-trunk-stat01.txt
>
>
> The following statement produces a NullPointerException:
>    CREATE VIEW v1 (f1) AS VALUES NULL;
> Stack trace:
> ----------------------------------------------------------------
> 2006-10-30 12:39:31.750 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-993b-512f-00000012f418
> on database directory C:\temp_sys\temp_Derby_TestErr_db
> Database Class Loader started - derby.database.classpath=''
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting
> 2006-10-30 12:39:38.484 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: CREATE VIEW v1 (f1) AS VALUES NULL
> java.lang.NullPointerException
>         at org.apache.derby.impl.sql.catalog.SYSCOLUMNSRowFactory.makeRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.CreateViewConstantAction.executeConstantAction(Unknown Source)
>         at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(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.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