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

Inconsistent behaviour of GROUP BY between MySQL and HSQLDB

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 5.0
    • Query
    • Hard

    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

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

            Dates

              Created:
              Updated:
              Resolved: