Merge pull request #171 from github/empty-table-progress
progress is 100% when 0/0 rows copied
This commit is contained in:
commit
1e88dbd04a
@ -941,7 +941,9 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) {
|
|||||||
totalRowsCopied := this.migrationContext.GetTotalRowsCopied()
|
totalRowsCopied := this.migrationContext.GetTotalRowsCopied()
|
||||||
rowsEstimate := atomic.LoadInt64(&this.migrationContext.RowsEstimate)
|
rowsEstimate := atomic.LoadInt64(&this.migrationContext.RowsEstimate)
|
||||||
var progressPct float64
|
var progressPct float64
|
||||||
if rowsEstimate > 0 {
|
if rowsEstimate == 0 {
|
||||||
|
progressPct = 100.0
|
||||||
|
} else {
|
||||||
progressPct = 100.0 * float64(totalRowsCopied) / float64(rowsEstimate)
|
progressPct = 100.0 * float64(totalRowsCopied) / float64(rowsEstimate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user