Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5530

SQLChar.getCollationKey NPE in index-stat-thread

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.7.1.1, 10.8.2.2, 10.9.1.0
    • 10.7.1.4, 10.8.3.0, 10.9.1.0
    • SQL
    • None
    • Windows 7 - NetBeans 6.9.1
    • Normal
    • Repro attached, Workaround attached
    • 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.

      Attachments

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

        Activity

          People

            kristwaa Kristian Waagan
            jylaxx Jean-Yves LINET
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: