From: mark burdett Date: Thu, 10 Jan 2019 03:35:16 +0000 (-0800) Subject: Create a temporary table because test is running inside a transaction. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c35aabb78820b272e3bd25a7a618c85c0be97284;p=civicrm-core.git Create a temporary table because test is running inside a transaction. --- diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index b1bff1e3ea..d4a98259b3 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -940,8 +940,9 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component { } try { - CRM_Core_DAO::executeQuery('CREATE TABLE civicrm_utf8mb4_test (id VARCHAR(255), PRIMARY KEY(id(255))) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC ENGINE=INNODB'); - CRM_Core_DAO::executeQuery('DROP table civicrm_utf8mb4_test'); + // Create a temporary table to avoid implicit commit. + CRM_Core_DAO::executeQuery('CREATE TEMPORARY TABLE civicrm_utf8mb4_test (id VARCHAR(255), PRIMARY KEY(id(255))) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC ENGINE=INNODB'); + CRM_Core_DAO::executeQuery('DROP TEMPORARY TABLE civicrm_utf8mb4_test'); } catch (PEAR_Exception $e) { $messages[] = new CRM_Utils_Check_Message(