1 system.install system_update_1086()

Preserve 4-byte UTF-8 database update value if set.

Related topics


core/modules/system/system.install, line 3414
Install, update and uninstall functions for the system module.


function system_update_1086() {
  $connection = Database::getConnection();
  $utf8mb4_active = $connection->utf8mb4IsActive();
  $utf8mb4_supported = $connection->utf8mb4IsSupported();
  // This variable is set by Drupal 7 on new installations that support UTF8-MB4
  // and when the update is performed by the "utf8mb4_convert" project.
  $d7_utf8mb4_run = update_variable_get('drupal_all_databases_are_utf8mb4', FALSE);
  $utf8mb4_state = state_get('database_utf8mb4_active', FALSE);
  if ($utf8mb4_supported && $utf8mb4_active && $d7_utf8mb4_run && !$utf8mb4_state) {
    state_set('database_utf8mb4_active', TRUE);