From: eileen Date: Wed, 24 Jul 2019 20:11:06 +0000 (+1200) Subject: dev/core#1141 remove sql_calc_rows X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9d1ef4d675c7eda08b2f3bb1964ff1a292d299bf;p=civicrm-core.git 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 --- 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);