From 6f8021aef1a1cebc2c9ab5d0799dfc13a9638940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=BCnig?= Date: Thu, 15 Oct 2020 20:01:53 +0200 Subject: [PATCH 1/2] add --no-tablespaces parameters to mysqldump --- .../integration/framework/Magento/TestFramework/Db/Mysql.php | 3 ++- .../Framework/Crontab/Test/Unit/CrontabManagerTest.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php index 7627d78df12dc..017669cba7e13 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php @@ -123,8 +123,9 @@ public function storeDbDump() } $format = sprintf( - '%s %s %s', + '%s %s %s %s', 'mysqldump --defaults-file=%s --host=%s --port=%s', + '--no-tablespaces' $additionalArguments, '%s > %s' ); diff --git a/lib/internal/Magento/Framework/Crontab/Test/Unit/CrontabManagerTest.php b/lib/internal/Magento/Framework/Crontab/Test/Unit/CrontabManagerTest.php index 904b76a1285e6..f990566f612a1 100644 --- a/lib/internal/Magento/Framework/Crontab/Test/Unit/CrontabManagerTest.php +++ b/lib/internal/Magento/Framework/Crontab/Test/Unit/CrontabManagerTest.php @@ -375,13 +375,13 @@ public function saveTasksDataProvider(): array ], [ 'tasks' => [ - ['command' => '{magentoRoot}run.php mysqldump db > db-$(date +%F).sql'] + ['command' => '{magentoRoot}run.php mysqldump --no-tablespaces db > db-$(date +%F).sql'] ], 'content' => '* * * * * /bin/php /var/www/cron.php', 'contentToSave' => '* * * * * /bin/php /var/www/cron.php' . PHP_EOL . CrontabManagerInterface::TASKS_BLOCK_START . ' ' . hash("sha256", BP) . PHP_EOL . '* * * * * ' . PHP_BINARY . ' /var/www/magento2/run.php' - . ' mysqldump db > db-\$(date +%%F).sql' . PHP_EOL + . ' mysqldump --no-tablespaces db > db-\$(date +%%F).sql' . PHP_EOL . CrontabManagerInterface::TASKS_BLOCK_END . ' ' . hash("sha256", BP) . PHP_EOL, ], ]; From 2bc78ad309c0f5b22d65dbfe260abfb739ca3e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=BCnig?= Date: Thu, 15 Oct 2020 22:33:20 +0200 Subject: [PATCH 2/2] Update Mysql.php add missing colon --- .../integration/framework/Magento/TestFramework/Db/Mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php index 017669cba7e13..54ae3dcb27a58 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php @@ -125,7 +125,7 @@ public function storeDbDump() $format = sprintf( '%s %s %s %s', 'mysqldump --defaults-file=%s --host=%s --port=%s', - '--no-tablespaces' + '--no-tablespaces', $additionalArguments, '%s > %s' );