return false;
}
+ /**
+ * Returns true if this database does an implicit sort when doing GROUP BY
+ */
+ function implicitGroupby() {
+ return true;
+ }
+
/**#@+
* Get function
*/
return true;
}
+ function implicitGroupby() {
+ return false;
+ }
+
static function newFromParams( $server = false, $user = false, $password = false, $dbName = false,
$failFunction = false, $flags = 0)
{
$NScat = NS_CATEGORY;
$dbr =& wfGetDB( DB_SLAVE );
$categorylinks = $dbr->tableName( 'categorylinks' );
+ $implicit_groupby = $dbr->implicitGroupby() ? '1' : 'cl_to';
$s= "SELECT 'Categories' as type,
{$NScat} as namespace,
cl_to as title,
- 1 as value,
+ $implicit_groupby as value,
COUNT(*) as count
FROM $categorylinks
GROUP BY 1,2,3,4";