Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-10216

Inconsistent behaviour of GROUP BY between MySQL and HSQLDB

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: Query
    • Labels:
    • Difficulty:
      Hard
    • Similar issues:

      Description

      As a developer, I expect that my HQL or XWQL queries will work the same whatever the database is used underneath. But it does not.

      In MySQL, this query works, meanwhile it does not with HSQLDB:

      SELECT prop1, prop2 FROM Table GROUP BY prop1
      

      The problem is that, with HSQL, we cannot do GROUP BY with only 1 column:
      http://stackoverflow.com/questions/11627814/hsql-view-error-expression-not-in-aggregate-or-group-by-columns#11629835

      When you use GROUP BY, all your selected columns must be in the GROUP BY list, except any column that is an aggregate.

      Use case: XWIKI-10189.

        Attachments

          Activity

            People

            • Assignee:
              mflorea Marius Dumitru Florea
              Reporter:
              gdelhumeau Guillaume Delhumeau
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: