Skip to content

Commit

Permalink
Merge pull request #13682 from mfb/utf8mb4-check-exception
Browse files Browse the repository at this point in the history
Force utf8mb4 query to throw exception as the check expects
  • Loading branch information
eileenmcnaughton authored Feb 24, 2019
2 parents b7c94ba + b9529ed commit 5795f57
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CRM/Utils/Check/Component/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,8 @@ public function checkMysqlUtf8mb4() {
return $messages;
}

// Force utf8mb4 query to throw exception as the check expects.
$errorScope = CRM_Core_TemporaryErrorScope::useException();
try {
// 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');
Expand Down

0 comments on commit 5795f57

Please sign in to comment.