Derby
  1. Derby
  2. DERBY-5530

SQLChar.getCollationKey NPE in index-stat-thread

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1, 10.8.2.2, 10.9.1.0
    • Fix Version/s: 10.7.1.4, 10.8.3.0, 10.9.1.0
    • Component/s: SQL
    • Labels:
      None
    • Environment:
      Windows 7 - NetBeans 6.9.1
    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached, Workaround attached
    • Bug behavior facts:
      Crash

      Description

      With this JDBC connection url is : jdbc:derby:directory:db_name;territory=fr_FR;collation=TERRITORY_BASED:PRIMARY;create=true
      I get a NullPointerException in index-stat-thread

      Sun Dec 11 19:33:11 CET 2011 Thread[pool-3-thread-1,5,main]

      {istat} "PROXIFLEX"."IDAXX_RES": update scheduled, reason=[no stats, row-estimate=375] (queueSize=1)
      Sun Dec 11 19:33:11 CET 2011 Thread[index-stat-thread,5,main] {istat,trace@26130360} worker thread started (xid=12049) [q/p/s=1/0/1,err:k/u/c=0/0/0,rej:f/d/o=0/0/0]
      Sun Dec 11 19:33:11 CET 2011 Thread[index-stat-thread,5,main] {istat,trace@26130360} processing "PROXIFLEX"."IDAXX_RES"
      Sun Dec 11 19:33:11 CET 2011 Thread[index-stat-thread,5,main] {istat}

      runtime exception during normal operation
      java.lang.NullPointerException
      at org.apache.derby.iapi.types.SQLChar.getCollationKey(Unknown Source)
      at org.apache.derby.iapi.types.WorkHorseForCollatorDatatypes.stringCompare(Unknown Source)
      at org.apache.derby.iapi.types.CollatorSQLVarchar.stringCompare(Unknown Source)
      at org.apache.derby.iapi.types.SQLChar.compare(Unknown Source)
      at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl$KeyComparator.compareWithPrevKey(Unknown Source)
      at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.updateIndexStatsMinion(Unknown Source)
      at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.generateStatistics(Unknown Source)
      at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.processingLoop(Unknown Source)
      at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:662)
      Sun Dec 11 19:33:11 CET 2011 Thread[index-stat-thread,5,main]

      {istat,trace@26130360}

      worker thread exit [q/p/s=0/0/1,err:k/u/c=0/0/0,rej:f/d/o=0/0/0]

      If I remove territory and collation parameters I don't have the exception.

      In case you want to disable automatic statistics, set derby property : derby.storage.indexStats.auto to false.

      1. derby-5530-1a-propagate_collation_info.diff
        4 kB
        Kristian Waagan
      2. repro-debug.log
        6 kB
        Dag H. Wanvik
      3. repro.log
        9 kB
        Dag H. Wanvik
      4. repro.sh
        0.4 kB
        Dag H. Wanvik
      5. script.sh
        0.3 kB
        Dag H. Wanvik

        Activity

        Jean-Yves LINET created issue -
        Dag H. Wanvik made changes -
        Field Original Value New Value
        Attachment script.sh [ 12514022 ]
        Dag H. Wanvik made changes -
        Attachment repro.sh [ 12514071 ]
        Attachment repro.log [ 12514072 ]
        Dag H. Wanvik made changes -
        Attachment repro-debug.log [ 12514073 ]
        Dag H. Wanvik made changes -
        Issue & fix info Repro attached [ 10424 ]
        Kristian Waagan made changes -
        Assignee Kristian Waagan [ kristwaa ]
        Kristian Waagan made changes -
        Bug behavior facts Crash [ 10365 ]
        Affects Version/s 10.7.1.1 [ 12315564 ]
        Affects Version/s 10.6.2.1 [ 12315343 ]
        Affects Version/s 10.5.3.0 [ 12314117 ]
        Affects Version/s 10.4.2.0 [ 12313345 ]
        Affects Version/s 10.3.3.0 [ 12313142 ]
        Issue & fix info Repro attached [ 10424 ] Repro attached,Workaround attached [ 10424,10427 ]
        Component/s SQL [ 11408 ]
        Kristian Waagan made changes -
        Kristian Waagan made changes -
        Issue & fix info Workaround attached,Repro attached [ 10427,10424 ] Patch Available,Repro attached,Workaround attached [ 10102,10424,10427 ]
        Kristian Waagan made changes -
        Fix Version/s 10.9.0.0 [ 12316344 ]
        Affects Version/s 10.9.0.0 [ 12316344 ]
        Affects Version/s 10.3.3.0 [ 12313142 ]
        Affects Version/s 10.4.2.0 [ 12313345 ]
        Affects Version/s 10.5.3.0 [ 12314117 ]
        Affects Version/s 10.6.2.1 [ 12315343 ]
        Issue & fix info Workaround attached,Repro attached,Patch Available [ 10427,10424,10102 ] Repro attached,Workaround attached [ 10424,10427 ]
        Kristian Waagan made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 10.7.1.4 [ 12315902 ]
        Fix Version/s 10.8.2.3 [ 12318540 ]
        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 [ 12645402 ] Default workflow, editable Closed status [ 12802149 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Kristian Waagan
            Reporter:
            Jean-Yves LINET
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development