diff --git a/Civi/Install/Requirements.php b/Civi/Install/Requirements.php index 4d2d3f72d423..df7a60a900fc 100644 --- a/Civi/Install/Requirements.php +++ b/Civi/Install/Requirements.php @@ -609,6 +609,7 @@ public function checkMysqlUtf8mb4($db_config) { return $results; } + mysqli_query($conn, 'DROP TABLE IF EXISTS civicrm_utf8mb4_test'); $r = mysqli_query($conn, 'CREATE TABLE civicrm_utf8mb4_test (id VARCHAR(255), PRIMARY KEY(id(255))) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC ENGINE=INNODB'); if (!$r) { $results['severity'] = $this::REQUIREMENT_WARNING; @@ -616,7 +617,7 @@ public function checkMysqlUtf8mb4($db_config) { mysqli_close($conn); return $results; } - mysqli_query('DROP TABLE civicrm_utf8mb4_test'); + mysqli_query($conn, 'DROP TABLE civicrm_utf8mb4_test'); // Ensure that the MySQL driver supports utf8mb4 encoding. $version = mysqli_get_client_info($conn);