From 6e41a6805859a006690c0237fcd486f3deb37b09 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sat, 21 Apr 2012 11:50:43 +0200 Subject: [PATCH] MDL-25407 ignore errors when converting to InnoDB and ignore timeout This should help resolve problems with table views and other unsupported stuff. --- admin/tool/innodb/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/tool/innodb/index.php b/admin/tool/innodb/index.php index bbe4d85bde6..d629486aaa4 100644 --- a/admin/tool/innodb/index.php +++ b/admin/tool/innodb/index.php @@ -46,11 +46,17 @@ if (data_submitted() and $confirm and confirm_sesskey()) { 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()).'
'.s($e->debuginfo)); + } } $DB->set_debug(false); }