Create a temporary table because test is running inside a transaction.
authormark burdett <mfburdett@gmail.com>
Thu, 10 Jan 2019 03:35:16 +0000 (19:35 -0800)
committermark burdett <mfburdett@gmail.com>
Thu, 10 Jan 2019 05:01:12 +0000 (21:01 -0800)
CRM/Utils/Check/Component/Env.php

index b1bff1e3ea20251c8f7a72a60ae739b2aa7d7fe5..d4a98259b3655f968d7563d2f71c318408aaf415 100644 (file)
@@ -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(