From 7e9f578e12b5f63b21feaeabc6dae2e968bfd4ec Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Thu, 18 Aug 2016 13:20:09 +0200 Subject: [PATCH] progress is 100% when 0/0 rows copied --- go/logic/migrator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/logic/migrator.go b/go/logic/migrator.go index cc418a9..10d1d81 100644 --- a/go/logic/migrator.go +++ b/go/logic/migrator.go @@ -941,7 +941,9 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) { totalRowsCopied := this.migrationContext.GetTotalRowsCopied() rowsEstimate := atomic.LoadInt64(&this.migrationContext.RowsEstimate) var progressPct float64 - if rowsEstimate > 0 { + if rowsEstimate == 0 { + progressPct = 100.0 + } else { progressPct = 100.0 * float64(totalRowsCopied) / float64(rowsEstimate) }