r53517 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53516‎ | r53517 | r53518 >
Date:02:20, 20 July 2009
Author:greg
Status:ok
Tags:
Comment:
Add standardSelectDistinct() function to help fork queries based on whether the order by items must appear in the select distinct list. See bug 18078.
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseMysql.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseMysql.php
@@ -289,6 +289,10 @@
290290 return '[http://www.mysql.com/ MySQL]';
291291 }
292292
 293+ function standardSelectDistinct() {
 294+ return false;
 295+ }
 296+
293297 /**
294298 * @return String: Database type for use in messages
295299 */
Index: trunk/phase3/includes/db/Database.php
@@ -193,6 +193,14 @@
194194 }
195195
196196 /**
 197+ * Returns true if this database requires that SELECT DISTINCT queries require that all
 198+ ORDER BY expressions occur in the SELECT list per the SQL92 standard
 199+ */
 200+ function standardSelectDistinct() {
 201+ return true;
 202+ }
 203+
 204+ /**
197205 * Returns true if this database can do a native search on IP columns
198206 * e.g. this works as expected: .. WHERE rc_ip = '127.42.12.102/32';
199207 */

Status & tagging log