Commit 47728fe1 authored by Robert Lyon's avatar Robert Lyon

Bug 1479543: Making sure the last run shows correct total

When updating the artefact table with new 'path' option

Change-Id: I6f236f53e907cb4f686c8973c9a98502fc0186ed
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 1ed5c4d0
......@@ -3344,7 +3344,10 @@ function xmldb_core_upgrade($oldversion=0) {
execute_sql("UPDATE {artefact} SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM {artefact} WHERE path IS NULL AND parent IS NULL LIMIT " . $limitsmall . ")");
}
$count += $limitsmall;
if (($count % $limit) == 0 || $count == $total) {
if (($count % $limit) == 0 || $count >= $total) {
if ($count > $total) {
$count = $total;
}
log_debug("$count/$total");
set_time_limit(30);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment