From 9d1ef4d675c7eda08b2f3bb1964ff1a292d299bf Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 25 Jul 2019 08:11:06 +1200 Subject: [PATCH] dev/core#1141 remove sql_calc_rows 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Report/Form/Contribute/History.php b/CRM/Report/Form/Contribute/History.php index 321b6317c5..2e8c9be10c 100644 --- a/CRM/Report/Form/Contribute/History.php +++ b/CRM/Report/Form/Contribute/History.php @@ -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); -- 2.25.1