Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349952 )

Change subject: Do not add limit to ApiQueryPagePropNames when database type is 
mysql
......................................................................

Do not add limit to ApiQueryPagePropNames when database type is mysql

It's a known bug in mysql < 5.6 (including WMF dbs) that it can handle
loose index when limit is applied. Given that number of possible types
is still very low, this shouldn't be a problem
More info: https://bugs.mysql.com/bug.php?id=61517

Bug: T115825
Change-Id: I4c3b885ac05b793088a92e054a38a36b9d07c0d4
---
M includes/api/ApiQueryPagePropNames.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/349952/1

diff --git a/includes/api/ApiQueryPagePropNames.php 
b/includes/api/ApiQueryPagePropNames.php
index 4966bcd..ff97668 100644
--- a/includes/api/ApiQueryPagePropNames.php
+++ b/includes/api/ApiQueryPagePropNames.php
@@ -57,7 +57,11 @@
                }
 
                $limit = $params['limit'];
-               $this->addOption( 'LIMIT', $limit + 1 );
+
+               // mysql has issues with limit in loose index T115825
+               if ( $this->getDB()->getType() !== 'mysql' ) {
+                       $this->addOption( 'LIMIT', $limit + 1 );
+               }
 
                $result = $this->getResult();
                $count = 0;

-- 
To view, visit https://gerrit.wikimedia.org/r/349952
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c3b885ac05b793088a92e054a38a36b9d07c0d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to