From 4f0cc137ccf86da81d137373c029410591b69bbf Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 5 Nov 2015 15:45:19 +0000 Subject: [PATCH] Enable SQL_BIG_SELECTS in reports @claudiosmweb --- includes/admin/reports/class-wc-admin-report.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/admin/reports/class-wc-admin-report.php b/includes/admin/reports/class-wc-admin-report.php index 9ed9978b5b7..bd3ef1a061a 100644 --- a/includes/admin/reports/class-wc-admin-report.php +++ b/includes/admin/reports/class-wc-admin-report.php @@ -296,6 +296,8 @@ class WC_Admin_Report { } if ( $debug || $nocache || false === $cached_results || ! isset( $cached_results[ $query_hash ] ) ) { + // Enable big selects for reports + $wpdb->query( 'SET SESSION SQL_BIG_SELECTS=1' ); $cached_results[ $query_hash ] = apply_filters( 'woocommerce_reports_get_order_report_data', $wpdb->$query_type( $query ), $data ); set_transient( strtolower( get_class( $this ) ), $cached_results, DAY_IN_SECONDS ); }