Derby
  1. Derby
  2. DERBY-5614

NullPointerException with INSERT INTO [global temporary table] SELECT ... FROM [VTI]

    Details

    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Crash

      Description

      Inserting into a global temporary table (GTT) while selecting data from a VTI fails with a NullPointerException:

      Caused by: java.lang.NullPointerException
      at org.apache.derby.impl.sql.execute.WriteCursorConstantAction.getEmptyHeapRow(WriteCursorConstantAction.java:324)
      at org.apache.derby.impl.sql.execute.InsertResultSet.bulkInsertCore(InsertResultSet.java:1209)
      at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:466)
      at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:443)
      at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:324)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1242)
      ... 6 more

      Investigation exposed the fact that bulk insert doesn't support a GTT as the target, and further that Derby enables bulk insert when the source is a VTI.

      1. derby-5614-1b-disable_bulkinsert_gtt.diff
        16 kB
        Kristian Waagan
      2. derby-5614-1a-disable_bulkinsert_gtt.diff
        0.9 kB
        Kristian Waagan
      3. repro.sql
        1 kB
        Dag H. Wanvik

        Issue Links

          Activity

          Kristian Waagan created issue -
          Dag H. Wanvik made changes -
          Field Original Value New Value
          Attachment repro.sql [ 12514534 ]
          Dag H. Wanvik made changes -
          Issue & fix info Repro attached [ 10424 ]
          Kristian Waagan made changes -
          Kristian Waagan made changes -
          Issue & fix info Repro attached [ 10424 ] Patch Available,Repro attached [ 10102,10424 ]
          Kristian Waagan made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Mamta A. Satoor made changes -
          Labels derby_triage10_9
          Mamta A. Satoor made changes -
          Urgency Normal [ 10052 ]
          Kristian Waagan made changes -
          Attachment derby-5614-1b-disable_bulkinsert_gtt.diff [ 12516323 ]
          Kristian Waagan made changes -
          Attachment derby-5614-1b-disable_bulkinsert_gtt.diff [ 12516323 ]
          Kristian Waagan made changes -
          Kristian Waagan made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Kristian Waagan made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Kristian Waagan made changes -
          Fix Version/s 10.9.0.0 [ 12316344 ]
          Kristian Waagan made changes -
          Link This issue blocks DERBY-5634 [ DERBY-5634 ]
          Kristian Waagan made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Issue & fix info Repro attached,Patch Available [ 10424,10102 ] Repro attached [ 10424 ]
          Fix Version/s 10.7.1.4 [ 12315902 ]
          Fix Version/s 10.8.2.3 [ 12318540 ]
          Resolution Fixed [ 1 ]
          Kristian Waagan made changes -
          Affects Version/s 10.8.2.2 [ 12317968 ]
          Affects Version/s 10.7.1.1 [ 12315564 ]
          Kristian Waagan made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mamta A. Satoor made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Mamta A. Satoor made changes -
          Affects Version/s 10.6.2.3 [ 12315434 ]
          Fix Version/s 10.6.2.3 [ 12315434 ]
          Mamta A. Satoor made changes -
          Assignee Kristian Waagan [ kristwaa ] Mamta A. Satoor [ mamtas ]
          Mamta A. Satoor made changes -
          Labels derby_triage10_9 derby_backport_reject_10_5 derby_triage10_9
          Mamta A. Satoor made changes -
          Assignee Mamta A. Satoor [ mamtas ] Kristian Waagan [ kristwaa ]
          Mamta A. Satoor made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Kathey Marsden made changes -
          Fix Version/s 10.8.3.0 [ 12323456 ]
          Fix Version/s 10.8.2.3 [ 12318540 ]
          Gavin made changes -
          Workflow jira [ 12653262 ] Default workflow, editable Closed status [ 12801962 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development