From e498621a95b533d1894c47b8a68ab9a09ef0988c Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Mon, 23 Apr 2012 19:19:19 +0200 Subject: [PATCH] MDL-25407 ignore errors in CLI mysql engine conversion script --- admin/cli/mysql_engine.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/cli/mysql_engine.php b/admin/cli/mysql_engine.php index c6d7c6ed956..3b51f413446 100644 --- a/admin/cli/mysql_engine.php +++ b/admin/cli/mysql_engine.php @@ -76,7 +76,13 @@ if (!empty($options['engine'])) { } echo str_pad($table->name, 40). " - "; - $DB->change_database_structure("ALTER TABLE {$table->name} ENGINE = $engine"); + try { + $DB->change_database_structure("ALTER TABLE {$table->name} ENGINE = $engine"); + } catch (moodle_exception $e) { + echo $e->getMessage()."\n"; + $skipped++; + continue; + } echo "DONE\n"; $converted++; }