Update inspect.go
This commit is contained in:
parent
94dfef3ae7
commit
74f807103e
@ -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")
|
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 count_rows from %s.%s`, sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName))
|
||||||
var rowsEstimate int64
|
var rowsEstimate int64
|
||||||
if err := this.db.QueryRow(query).Scan(&rowsEstimate); err != nil {
|
if err := this.db.QueryRow(query).Scan(&rowsEstimate); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user