From f40f14b9eeba6205fdcc303132548a6e29ce3318 Mon Sep 17 00:00:00 2001 From: "Fan()" <18501341937@163.com> Date: Thu, 29 Apr 2021 13:43:24 +0800 Subject: [PATCH] Update inspect.go fix https://github.com/github/gh-ost/issues/961 --- go/logic/inspect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/logic/inspect.go b/go/logic/inspect.go index 0128010..3d101c0 100644 --- a/go/logic/inspect.go +++ b/go/logic/inspect.go @@ -528,7 +528,7 @@ func (this *Inspector) CountTableRows() error { this.migrationContext.Log.Infof("As instructed, I'm issuing a SELECT COUNT(*) on the table. This may take a while") - query := fmt.Sprintf(`select /* gh-ost */ count(*) as rows from %s.%s`, sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName)) + query := fmt.Sprintf(`select /* gh-ost */ count(*) as 'rows' from %s.%s`, sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName)) var rowsEstimate int64 if err := this.db.QueryRow(query).Scan(&rowsEstimate); err != nil { return err