Derby
  1. Derby
  2. DERBY-5276

Reference manual has wrong length for BIGINT columns in system tables

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.8.2.2, 10.9.1.0
    • Component/s: Documentation
    • Labels:
      None

      Description

      The description of the SYSCOLUMNS table at http://db.apache.org/derby/docs/dev/ref/rrefsistabs22441.html says that the BIGINT columns AUTOINCREMENTVALUE, AUTOINCREMENTSTART and AUTOINCREMENTINC have length 19. The maximum length of a BIGINT is 20 (when including the sign for negative values). Here's an example that shows that these columns can hold values whose length is 20:

      ij> create table t(x bigint not null generated always as identity (start with -1234567890123456789, increment by -1234567890123456789));
      0 rows inserted/updated/deleted
      ij> select autoincrementvalue, autoincrementstart, autoincrementinc from sys.syscolumns where columnname='X';
      AUTOINCREMENTVALUE |AUTOINCREMENTSTART |AUTOINCREMENTINC
      --------------------------------------------------------------
      -1234567890123456789|-1234567890123456789|-1234567890123456789

      1 row selected

      Other places where BIGINT columns are listed with length 19:

      SYSCONGLOMERATES - http://db.apache.org/derby/docs/dev/ref/rrefsistabs39391.html
      SYSFILES - http://db.apache.org/derby/docs/dev/ref/rrefsistabs40972.html
      SYSSEQUENCES - http://db.apache.org/derby/docs/dev/ref/rrefsistabssyssequences.html
      SYSXPLAIN_RESULTSET_TIMINGS - http://db.apache.org/derby/docs/dev/ref/rrefsysxplain_resultset_timings.html
      SYSXPLAIN_STATEMENT_TIMINGS - http://db.apache.org/derby/docs/dev/ref/rrefsysxplain_statement_timings.html
      SYSCS_DIAG.SPACE_TABLE - http://db.apache.org/derby/docs/dev/ref/rrefsyscsdiagtables.html

      I haven't verified if negative values are allowed in all of these columns. If they are only allowed to hold non-negative values, should we keep the value 19? Or should we change all to 20 for consistency? I'm assuming that "length" in these tables refers to the display size of the columns.

      1. derby5276.zip
        19 kB
        Kim Haase
      2. derby5276.stat
        0.3 kB
        Kim Haase
      3. derby5276-ref.diff
        11 kB
        Jayaram Subramanian

        Activity

        Gavin made changes -
        Workflow jira [ 12616620 ] Default workflow, editable Closed status [ 12801076 ]
        Myrna van Lunteren made changes -
        Fix Version/s 10.8.2.2 [ 12317968 ]
        Fix Version/s 10.8.2.0 [ 12317955 ]
        Myrna van Lunteren made changes -
        Fix Version/s 10.8.2.0 [ 12317955 ]
        Fix Version/s 10.8.1.6 [ 12316676 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kim Haase made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Issue & fix info [Patch Available]
        Fix Version/s 10.8.1.6 [ 12316676 ]
        Fix Version/s 10.9.0.0 [ 12316344 ]
        Resolution Fixed [ 1 ]
        Kim Haase made changes -
        Attachment derby5276.stat [ 12489484 ]
        Attachment derby5276.zip [ 12489485 ]
        Jayaram Subramanian made changes -
        Issue & fix info [Patch Available]
        Jayaram Subramanian made changes -
        Attachment derby5276-ref.diff [ 12489435 ]
        Jayaram Subramanian made changes -
        Field Original Value New Value
        Assignee Jayaram Subramanian [ rsjay1976 ]
        Knut Anders Hatlen created issue -

          People

          • Assignee:
            Jayaram Subramanian
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development