diff --git a/mysql-test/suite/innodb/t/innodb_bug53756.test b/mysql-test/suite/innodb/t/innodb_bug53756.test
index 7a48f130b2c3c310fe5586177b25e21582bf7868..04856d448cb1d71521eb825c6301d7f51821a17b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53756.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53756.test
@@ -139,6 +139,9 @@ INSERT INTO bug_53756 VALUES (666,666);
 # Request a crash on next execution of commit.
 SET SESSION debug="+d,crash_commit_before";
 #
+# Write file to make mysql-test-run.pl start up the server again
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+#
 # Execute the statement that causes the crash.
 --error 2013
 COMMIT;
@@ -154,9 +157,6 @@ COMMIT;
 --echo #
 --echo # Restart server.
 #
-# Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-#
 # Turn on reconnect
 --enable_reconnect
 #
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug53756.test b/mysql-test/suite/innodb_plugin/t/innodb_bug53756.test
index 37a79ea302154593430b941deaf543faf3786375..ba035fe0a4677c6cc39b1c8b2a71b91d44ee072e 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb_bug53756.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53756.test
@@ -139,6 +139,9 @@ INSERT INTO bug_53756 VALUES (666,666);
 # Request a crash on next execution of commit.
 SET SESSION debug="+d,crash_commit_before";
 #
+# Write file to make mysql-test-run.pl start up the server again
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+#
 # Execute the statement that causes the crash.
 --error 2013
 COMMIT;
@@ -154,9 +157,6 @@ COMMIT;
 --echo #
 --echo # Restart server.
 #
-# Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-#
 # Turn on reconnect
 --enable_reconnect
 #