From 2de38180d375d6f5978af83a01b8ba558902dade Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 15 Jan 2016 11:43:06 +0000 Subject: [PATCH] Remove isolation levels causing issue on some servers --- includes/wc-core-functions.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index f3ecd9108c1..a9d602c8584 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -858,16 +858,10 @@ function wc_array_cartesian( $input ) { function wc_transaction_query( $type = 'start' ) { global $wpdb; - if ( ! defined( 'WC_USE_TRANSACTIONS' ) ) { - // Try to set isolation level to support dirty reads - if this is unsupported, do not use transactions - $wpdb->hide_errors(); - $result = $wpdb->query( 'SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;' ); + $wpdb->hide_errors(); - if ( false === $result ) { - define( 'WC_USE_TRANSACTIONS', false ); - } else { - define( 'WC_USE_TRANSACTIONS', true ); - } + if ( ! defined( 'WC_USE_TRANSACTIONS' ) ) { + define( 'WC_USE_TRANSACTIONS', true ); } if ( WC_USE_TRANSACTIONS ) {