diff --git a/scripts/remove_session b/scripts/remove_session index e35e33b..3b33aa6 100755 --- a/scripts/remove_session +++ b/scripts/remove_session @@ -94,8 +94,9 @@ sub remove_orphaned_versions { $i++; } $dbh->{'mysql_use_result'} = 0; + print "\t$i records from instances processed, ", $versions->count(0, -1), " versions left\n"; - for (my $version = $versions->first; $version; $version = $versions->next($version)) { + for (my $version = $versions->first(0); $version; $version = $versions->next($version)) { $dbh->do(q{delete from versions2 where id=?}, {}, $version); print "\tversion $version deleted\n"; }