Project

General

Profile

Actions

Bug #16960

closed

SQL error with DBAL/PostgreSQL: List or look up reviewed extensions

Added by Mathias Behrle over 17 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Should have
Category:
Extension Manager
Target version:
-
Start date:
2007-02-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

While "List or look up reviewed extensions":
sqlError ERROR: column "cache_extensions.category" must appear in the GROUP BY clause or be used in an aggregate function:

SELECT count(*) as "cnt" FROM "cache_extensions" WHERE 1 = 1 AND "reviewstate" > 0 AND "state" != 5 AND "lastreviewedversion" > 0 ORDER BY "category", "title"

The ORDER BY clause must also be contained in GROUP BY clause.

Attached patch works for me on PostgreSQL.

typo3-dev 4.1 (svn)
postgresql 8.1.4-6~bpo.1
apache2 2.0.54-5sarge1
php5 5.2.0-8~bpo.2
Firefox/Iceweasel/2.0.0.1
(issue imported from #M4947)


Files

class.em_xmlhandler.patch (1.18 KB) class.em_xmlhandler.patch Administrator Admin, 2007-02-08 18:19
Actions #1

Updated by Martin Kutschker over 17 years ago

I think the order clause is pointless for the COUNT and it can safely be omitted. The grouping makes no sense.

Actions #2

Updated by Ingmar Schlecht over 17 years ago

Karsten/Masi, can one of you please fix this?

If it's a no-brainer please just commit and send the patch as FYI to the core list.

Thanks!
Ingmar

Actions #3

Updated by Martin Kutschker over 17 years ago

Fixed in SVN (by removing the order clause).

Actions

Also available in: Atom PDF