Add standardSelectDistinct() function to help fork queries based on whether the order...
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 20 Jul 2009 02:20:15 +0000 (02:20 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 20 Jul 2009 02:20:15 +0000 (02:20 +0000)
includes/db/Database.php
includes/db/DatabaseMysql.php

index b05a6a9..c505161 100644 (file)
@@ -192,6 +192,14 @@ abstract class DatabaseBase {
                return true;
        }
 
+       /**
+        * Returns true if this database requires that SELECT DISTINCT queries require that all 
+       ORDER BY expressions occur in the SELECT list per the SQL92 standard
+        */
+       function standardSelectDistinct() {
+               return true;
+       }
+
        /**
         * Returns true if this database can do a native search on IP columns
         * e.g. this works as expected: .. WHERE rc_ip = '127.42.12.102/32';
index 31de630..e985854 100644 (file)
@@ -289,6 +289,10 @@ class DatabaseMysql extends DatabaseBase {
                return '[http://www.mysql.com/ MySQL]';
        }
 
+       function standardSelectDistinct() {
+               return false;
+       }
+
        /**
         * @return String: Database type for use in messages
        */