Permalink
Browse files

MDL-25407 ignore errors when converting to InnoDB and ignore timeout

This should help resolve problems with table views and other unsupported stuff.
  • Loading branch information...
1 parent 93fb7b5 commit 6e41a6805859a006690c0237fcd486f3deb37b09 @skodak skodak committed Apr 21, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 admin/tool/innodb/index.php
@@ -46,11 +46,17 @@
echo $OUTPUT->notification('Please be patient and wait for this to complete...', 'notifysuccess');
+ set_time_limit(0);
+
if ($tables = $DB->get_tables()) {
$DB->set_debug(true);
foreach ($tables as $table) {
$fulltable = $DB->get_prefix().$table;
- $DB->change_database_structure("ALTER TABLE $fulltable ENGINE=INNODB");
+ try {
+ $DB->change_database_structure("ALTER TABLE $fulltable ENGINE=INNODB");
+ } catch (moodle_exception $e) {
+ echo $OUTPUT->notification(s($e->getMessage()).'<br />'.s($e->debuginfo));
+ }
}
$DB->set_debug(false);
}

0 comments on commit 6e41a68

Please sign in to comment.