From c35aabb78820b272e3bd25a7a618c85c0be97284 Mon Sep 17 00:00:00 2001 From: mark burdett Date: Wed, 9 Jan 2019 19:35:16 -0800 Subject: [PATCH] Create a temporary table because test is running inside a transaction. --- CRM/Utils/Check/Component/Env.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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( -- 2.25.1