diff --git a/ghost/data-generator/lib/DataGenerator.js b/ghost/data-generator/lib/DataGenerator.js index c59d76c719..19be09572e 100644 --- a/ghost/data-generator/lib/DataGenerator.js +++ b/ghost/data-generator/lib/DataGenerator.js @@ -270,6 +270,13 @@ class DataGenerator { }); await tableImporter.finalise(); } + + // Re-enable the redo log because it's a persisted global + // Leaving it disabled can break the database in the event of an unexpected shutdown + // See https://dev.mysql.com/doc/refman/8.0/en/innodb-redo-log.html#innodb-disable-redo-logging + if (!DatabaseInfo.isSQLite(this.knex)) { + await transaction.raw('ALTER INSTANCE ENABLE INNODB REDO_LOG;'); + } } }