dev/core#1141 remove sql_calc_rows
authoreileen <emcnaughton@wikimedia.org>
Wed, 24 Jul 2019 20:11:06 +0000 (08:11 +1200)
committereileen <emcnaughton@wikimedia.org>
Wed, 24 Jul 2019 20:11:06 +0000 (08:11 +1200)
It's gone for mysql8 & I just checked & in this case the count is never used so it can just go

CRM/Report/Form/Contribute/History.php

index 321b6317c580f00d25c3998070e0d91203a77044..2e8c9be10c2ed169590134243ad58689c6e85458 100644 (file)
@@ -610,7 +610,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
       $addWhere .= " AND {$this->_aliases['civicrm_contact']}.id IN ( SELECT DISTINCT cont.id FROM civicrm_contact cont, civicrm_contribution contri WHERE cont.id = contri.contact_id AND {$receive_date} = {$this->_referenceYear['this_year']} AND contri.is_test = 0 ) ";
     }
     $this->limit();
-    $getContacts = "SELECT SQL_CALC_FOUND_ROWS {$this->_aliases['civicrm_contact']}.id as cid, SUM({$this->_aliases['civicrm_contribution']}.total_amount) as civicrm_contribution_total_amount_sum {$this->_from} {$this->_where} {$addWhere} GROUP BY {$this->_aliases['civicrm_contact']}.id {$this->_having} {$this->_limit}";
+    $getContacts = "SELECT {$this->_aliases['civicrm_contact']}.id as cid, SUM({$this->_aliases['civicrm_contribution']}.total_amount) as civicrm_contribution_total_amount_sum {$this->_from} {$this->_where} {$addWhere} GROUP BY {$this->_aliases['civicrm_contact']}.id {$this->_having} {$this->_limit}";
 
     $dao = CRM_Core_DAO::executeQuery($getContacts);