Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-9796

Search by Labels generates a "group by" clause of more than 600 bytes, leading to an exception in Sybase

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Medium
    • None
    • 2.6.0
    • Search - Core

    Description

      Sybase does not allow a key size (group by clause) of more than 600bytes.
      In Confluence, while searching by labels, the following query:

       <sql-query name="confluence.label_findSingleDegreeSeparationFromLabelBySpace"><![CDATA[select distinct {l.*}, count(lc2.LABELID) as labelCount from LABEL l, CONTENT_LABEL lc1, CONTENT_LABEL lc2 where lc1.LABELID = :labelID and lc1.CONTENTID = lc2.CONTENTID and lc2.LABELID != :labelID and lower(lc2.SPACEKEY) = :spaceKey and lc2.LABELID = l.LABELID AND l.NAMESPACE = 'global' group by lc2.LABELID, l.LABELID, l.NAMESPACE, l.NAME, l.OWNER, l.CREATIONDATE, l.LASTMODDATE order by labelCount desc]]><return alias="l" class="com.atlassian.confluence.labels.Label"/></sql-query>
      

      generates a key size of more than 600 bytes, leading to an exception such as:

      [23-10-2007 09:12:59.037] [224565] [STDOUT] [INFO ] [ajp-0.0.0.0-61781-1] 2007-10-23 09:12:59,033 ERROR [ajp-0.0.0.0-61781-1] [sf.hibernate.util.JDBCExceptionReporter] logExceptions The current query would generate a key size of 799 for a work table.  This exceeds the maximum allowable limit of 600.
      

      Apart from the above query, there are other queries pertaining to "Search by label", which add upto a key size of more than 600 bytes, which may potentially lead to a similar error.

      Logs attached for more details.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ganand Gurleen Anand [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: