https://bugzilla.wikimedia.org/show_bug.cgi?id=31913

       Web browser: ---
             Bug #: 31913
           Summary: GROUP BY clauses incorrect in SQL generated for
                    special pages
           Product: MediaWiki
           Version: 1.19-svn
          Platform: PC
        OS/Version: Windows 7
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Database
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


While working on SQL SERVER support for 1.19alpha (Bug 9767), which is mostly
working, I discovered an issue with at least one of the special pages.
Special:ListRedirects generates SQL that looks like (LIMIT/TOP clauses, which
differ between MySQL and SQL Server, were removed):

SELECT tl_namespace AS namespace,tl_title AS title,
COUNT(*) AS value FROM templatelinks
WHERE tl_namespace = '10'
GROUP BY namespace, title ORDER BY value DESC 

It should look like

SELECT tl_namespace AS namespace,tl_title AS title,
COUNT(*) AS value FROM templatelinks
WHERE tl_namespace = '10'
GROUP BY tl_namespace, tl_title ORDER BY value DESC 

The former syntax is peculiar to MySQL, while the latter syntax is correct on
both MySQL and SQL Server.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to