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

Wrong description of IndexName field in public JavaDoc for LockTable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 10.3.1.4
    • 10.4.1.3
    • Javadoc
    • None

    Description

      The public JavaDoc for LockTable says the following in the description of the INDEXNAME retrieved from SYSCS_DIAG.LOCK_TABLE:

      INDEXNAME varchar(128) - normally null. If non-null, a lock is held on the index, this can only happen if this is not a user transaction.

      I think the last part is wrong. Normal user transactions might also have a value in the INDEXNAME. For example, here is part of the lock table for three user transactions:

      XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|INDEXNAME
      ---------------------------------------------------------------------
      186 |ROW |X |T2 |(1,9) |GRANT|T |NULL
      184 |ROW |S |T2 |(1,9) |WAIT |T |NULL
      188 |ROW |X |T1 |(1,11) |GRANT|T |NULL
      186 |ROW |S |T1 |(1,11) |WAIT |T |NULL
      186 |ROW |S |T1 |(1,1) |GRANT|T |SQL070425023213370
      188 |ROW |S |T1 |(1,1) |GRANT|T |SQL070425023213370
      184 |ROW |X |T1 |(1,7) |GRANT|T |NULL
      188 |ROW |S |T1 |(1,7) |WAIT |T |NULL

      Two of the lock entries have an index. I expect this to be the Scan lock that have been set during traversal of the B-tree.

      Proposed fix: remove the last part of the sentence.

      Attachments

        1. DERBY-2592.diff
          3 kB
          Jazarine Jamal
        2. DERBY-2592_v2.diff
          0.6 kB
          Jazarine Jamal

        Activity

          People

            jazarine Jazarine Jamal
            olav Olav Sandstaa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: