Change GROUP BY to standard SQL form by specifying all fields.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Fri, 14 Jul 2006 19:48:22 +0000 (19:48 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Fri, 14 Jul 2006 19:48:22 +0000 (19:48 +0000)
includes/SpecialCategories.php
includes/SpecialListusers.php
includes/SpecialMostcategories.php
includes/SpecialMostimages.php
includes/SpecialMostlinked.php
includes/SpecialMostlinkedcategories.php
includes/SpecialMostrevisions.php
includes/SpecialWantedcategories.php
includes/SpecialWantedpages.php

index 8a6dd5f..89cff20 100644 (file)
@@ -36,7 +36,7 @@ class CategoriesPage extends QueryPage {
                                1 as value,
                                COUNT(*) as count
                           FROM $categorylinks
-                          GROUP BY cl_to";
+                          GROUP BY 1,2,3,4";
                return $s;
        }
 
index 20b26b6..3c22e9d 100644 (file)
@@ -132,7 +132,7 @@ class ListUsersPage extends QueryPage {
                        "FROM $user ".
                        "LEFT JOIN $user_groups ON user_id=ug_user " .
                        $this->userQueryWhere( $dbr ) .
-                       " GROUP BY user_name";
+                       " GROUP BY 1, 2, 3, 4, 5";
 
                return $sql;
        }
index 5591bbc..c0d662c 100644 (file)
@@ -31,7 +31,7 @@ class MostcategoriesPage extends QueryPage {
                        FROM $categorylinks
                        LEFT JOIN $page ON cl_from = page_id
                        WHERE page_namespace = " . NS_MAIN . "
-                       GROUP BY cl_from
+                       GROUP BY 1,2,3
                        HAVING COUNT(*) > 1
                        ";
        }
index 30fbddd..09f7108 100644 (file)
@@ -29,7 +29,7 @@ class MostimagesPage extends QueryPage {
                                il_to as title,
                                COUNT(*) as value
                        FROM $imagelinks
-                       GROUP BY il_to
+                       GROUP BY 1,2,3
                        HAVING COUNT(*) > 1
                        ";
        }
index ccccc1a..1791228 100644 (file)
@@ -37,7 +37,7 @@ class MostlinkedPage extends QueryPage {
                                page_namespace
                        FROM $pagelinks
                        LEFT JOIN $page ON pl_namespace=page_namespace AND pl_title=page_title
-                       GROUP BY pl_namespace,pl_title
+                       GROUP BY 1,2,3,5
                        HAVING COUNT(*) > 1";
        }
 
index 0944d2f..5942b3f 100644 (file)
@@ -32,7 +32,7 @@ class MostlinkedCategoriesPage extends QueryPage {
                                cl_to as title,
                                COUNT(*) as value
                        FROM $categorylinks
-                       GROUP BY cl_to
+                       GROUP BY 1,2,3
                        ";
        }
 
index 81a49c9..676923a 100644 (file)
@@ -31,9 +31,9 @@ class MostrevisionsPage extends QueryPage {
                                page_title as title,
                                COUNT(*) as value
                        FROM $revision
-                       LEFT JOIN $page ON page_id = rev_page
+                       JOIN $page ON page_id = rev_page
                        WHERE page_namespace = " . NS_MAIN . "
-                       GROUP BY rev_page
+                       GROUP BY 1,2,3
                        HAVING COUNT(*) > 1
                        ";
        }
index 8e75953..97bb0a2 100644 (file)
@@ -34,7 +34,7 @@ class WantedCategoriesPage extends QueryPage {
                        FROM $categorylinks
                        LEFT JOIN $page ON cl_to = page_title AND page_namespace = ". NS_CATEGORY ."
                        WHERE page_title IS NULL
-                       GROUP BY cl_to
+                       GROUP BY 1,2,3
                        ";
        }
 
index 8bbe49c..7b07060 100644 (file)
@@ -46,7 +46,7 @@ class WantedPagesPage extends QueryPage {
                         WHERE pg1.page_namespace IS NULL
                         AND pl_namespace NOT IN ( 2, 3 )
                         AND pg2.page_namespace != 8
-                        GROUP BY pl_namespace, pl_title
+                        GROUP BY 1,2,3
                         HAVING COUNT(*) > $count";
        }