From 1079a303d9960379ba8fbbaf89c071ccba66e3c5 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Fri, 25 Oct 2019 10:36:54 +0100 Subject: [PATCH] Remove CIVICRM_SUPPORT_MULTIPLE_LOCKS and make it always enabled if available --- CRM/Utils/SQL.php | 5 ----- templates/CRM/common/civicrm.settings.php.template | 14 -------------- 2 files changed, 19 deletions(-) diff --git a/CRM/Utils/SQL.php b/CRM/Utils/SQL.php index d7aab2132bc..7c53535c751 100644 --- a/CRM/Utils/SQL.php +++ b/CRM/Utils/SQL.php @@ -124,16 +124,11 @@ public static function isGroupByModeInDefault() { * * https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock * - * As an interim measure we ALSO require CIVICRM_SUPPORT_MULTIPLE_LOCKS to be defined. - * * This is a conservative measure to introduce the change which we expect to deprecate later. * * @todo we only check mariadb & mysql right now but maybe can add percona. */ public static function supportsMultipleLocks() { - if (!defined('CIVICRM_SUPPORT_MULTIPLE_LOCKS')) { - return FALSE; - } static $isSupportLocks = NULL; if (!isset($isSupportLocks)) { $version = self::getDatabaseVersion(); diff --git a/templates/CRM/common/civicrm.settings.php.template b/templates/CRM/common/civicrm.settings.php.template index c326ea4229d..4d2683f3007 100644 --- a/templates/CRM/common/civicrm.settings.php.template +++ b/templates/CRM/common/civicrm.settings.php.template @@ -462,20 +462,6 @@ if (!defined('CIVICRM_PSR16_STRICT')) { */ define('CIVICRM_DEADLOCK_RETRIES', 3); -/** - * Enable support for multiple locks. - * - * This is a transitional setting. When enabled sites with mysql 5.7.5+ or equivalent - * MariaDB can improve their DB conflict management. - * - * There is no known or expected downside or enabling this (and definite upside). - * The setting only exists to allow sites to manage change in their environment - * conservatively for the first 3 months. - * - * See https://github.com/civicrm/civicrm-core/pull/13854 - */ - // define('CIVICRM_SUPPORT_MULTIPLE_LOCKS', TRUE); - /** * Configure MySQL to throw more errors when encountering unusual SQL expressions. *