]> git.mjollnir.org Git - moodle.git/commitdiff
Added some flushes in case the indexes take too long ...
authormoodler <moodler>
Mon, 28 Jul 2003 03:28:43 +0000 (03:28 +0000)
committermoodler <moodler>
Mon, 28 Jul 2003 03:28:43 +0000 (03:28 +0000)
lib/db/mysql.php
lib/db/postgres7.php

index 7ad20d9af29fba550dceddb517a4a162d6489239..33ea8caaf53f70a551d3ab6fac1b4c8757933aca 100644 (file)
@@ -407,6 +407,7 @@ function main_upgrade($oldversion=0) {
 
     if ($oldversion < 2003072800) {
         print_simple_box("The following database index improves performance, but can be quite large - if you are upgrading and you have problems with a limited quota you may want to delete this index later from the '{$CFG->prefix}log' table in your database", "center", "50%", "$THEME->cellheading", "20", "noticebox");
+        flush();
         execute_sql(" ALTER TABLE `{$CFG->prefix}log` ADD INDEX timecoursemoduleaction (time,course,module,action) ");
         execute_sql(" ALTER TABLE `{$CFG->prefix}user_students` ADD INDEX courseuserid (course,userid) ");
         execute_sql(" ALTER TABLE `{$CFG->prefix}user_teachers` ADD INDEX courseuserid (course,userid) ");
index 9d7afae0164a4494ee89e80eac109507f25e1174..653423fef6763da613b2593981f66edfb0bfa8c7 100644 (file)
@@ -178,6 +178,7 @@ function main_upgrade($oldversion=0) {
 
     if ($oldversion < 2003072800) {
         print_simple_box("The following database index improves performance, but can be quite large - if you are upgrading and you have problems with a limited quota you may want to delete this index later from the '{$CFG->prefix}log' table in your database", "center", "50%", "$THEME->cellheading", "20", "noticebox");
+        flush();
         execute_sql(" CREATE INDEX {$CFG->prefix}log_timecoursemoduleaction_idx ON {$CFG->prefix}log (time,course,module,action) ");
         execute_sql(" CREATE INDEX {$CFG->prefix}user_students_courseuserid_idx ON {$CFG->prefix}user_students (course,userid) ");
         execute_sql(" CREATE INDEX {$CFG->prefix}user_teachers_courseuserid_idx ON {$CFG->prefix}user_teachers (course,userid) ");