Enable SQL_BIG_SELECTS in reports

@claudiosmweb
This commit is contained in:
Mike Jolley 2015-11-05 15:45:19 +00:00
parent 4e5baf23aa
commit 4f0cc137cc
1 changed files with 2 additions and 0 deletions

View File

@ -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 );
}