Derby
  1. Derby
  2. DERBY-5531

Assert failure when inserting NULL into indexed column with territory-based collation

    Details

    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached

      Description

      ij> connect 'jdbc:derby:colldb;territory=en;collation=TERRITORY_BASED;create=true';
      ij> create table t(x varchar(10) unique);
      0 rows inserted/updated/deleted
      ij> insert into t values null;
      ERROR XJ001: Java exception: 'ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.SQLVarchartype of template column[0] = org.apache.derby.iapi.types.CollatorSQLVarchar: org.apache.derby.shared.common.sanity.AssertFailure'.
      java.sql.SQLException: Java exception: 'ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.SQLVarchartype of template column[0] = org.apache.derby.iapi.types.CollatorSQLVarchar: org.apache.derby.shared.common.sanity.AssertFailure'.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:98)
      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
      at org.apache.derby.impl.jdbc.Util.javaException(Util.java:299)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:436)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2288)
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1334)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:630)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:559)
      at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367)
      at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:527)
      at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:369)
      at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
      at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
      at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
      at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
      at org.apache.derby.tools.ij.main(ij.java:59)
      at org.apache.derby.iapi.tools.run.main(run.java:53)
      Caused by: java.sql.SQLException: Java exception: 'ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.SQLVarchartype of template column[0] = org.apache.derby.iapi.types.CollatorSQLVarchar: org.apache.derby.shared.common.sanity.AssertFailure'.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:42)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
      ... 18 more
      Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.SQLVarchartype of template column[0] = org.apache.derby.iapi.types.CollatorSQLVarchar
      at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
      at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
      at org.apache.derby.impl.store.access.btree.OpenBTree.isIndexableRowConsistent(OpenBTree.java:515)
      at org.apache.derby.impl.store.access.btree.BTreeController.doIns(BTreeController.java:679)
      at org.apache.derby.impl.store.access.btree.BTreeController.insert(BTreeController.java:1374)
      at org.apache.derby.impl.store.access.btree.index.B2IController.insert(B2IController.java:210)
      at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(IndexChanger.java:440)
      at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(IndexChanger.java:383)
      at org.apache.derby.impl.sql.execute.IndexChanger.insert(IndexChanger.java:590)
      at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(IndexSetChanger.java:268)
      at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(RowChangerImpl.java:453)
      at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(InsertResultSet.java:999)
      at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:519)
      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)
      ... 11 more

      1. DERBY5531_proposal1_diff.txt
        4 kB
        Mamta A. Satoor
      2. DERBY5531_proposal2_diff.txt
        3 kB
        Mamta A. Satoor

        Activity

        Knut Anders Hatlen created issue -
        Mamta A. Satoor made changes -
        Field Original Value New Value
        Labels derby_triage10_9
        Urgency Normal [ 10052 ]
        Issue & fix info Repro attached [ 10424 ]
        Mamta A. Satoor made changes -
        Assignee Mamta A. Satoor [ mamtas ]
        Mamta A. Satoor made changes -
        Attachment DERBY5531_proposal1_diff.txt [ 12541472 ]
        Attachment DERBY5531_proposal2_diff.txt [ 12541473 ]
        Mamta A. Satoor made changes -
        Fix Version/s 10.10.0.0 [ 12321550 ]
        Mamta A. Satoor made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mamta A. Satoor made changes -
        Fix Version/s 10.9.1.1 [ 12321551 ]
        Mamta A. Satoor made changes -
        Fix Version/s 10.8.2.3 [ 12318540 ]
        Mamta A. Satoor made changes -
        Fix Version/s 10.7.1.4 [ 12315902 ]
        Mamta A. Satoor made changes -
        Fix Version/s 10.6.2.3 [ 12315434 ]
        Mamta A. Satoor made changes -
        Fix Version/s 10.5.3.2 [ 12315436 ]
        Mamta A. Satoor made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kathey Marsden made changes -
        Fix Version/s 10.8.3.0 [ 12323456 ]
        Fix Version/s 10.8.2.3 [ 12318540 ]
        Kathey Marsden made changes -
        Fix Version/s 10.9.2.0 [ 12323562 ]
        Fix Version/s 10.9.1.1 [ 12321551 ]
        Gavin made changes -
        Workflow jira [ 12645493 ] Default workflow, editable Closed status [ 12801882 ]

          People

          • Assignee:
            Mamta A. Satoor
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development