Collecting and presenting MySQL versions of applier and inspector
This commit is contained in:
parent
8914bc2b48
commit
ed5dd7f049
@ -135,7 +135,9 @@ type MigrationContext struct {
|
|||||||
OriginalBinlogFormat string
|
OriginalBinlogFormat string
|
||||||
OriginalBinlogRowImage string
|
OriginalBinlogRowImage string
|
||||||
InspectorConnectionConfig *mysql.ConnectionConfig
|
InspectorConnectionConfig *mysql.ConnectionConfig
|
||||||
|
InspectorMySQLVersion string
|
||||||
ApplierConnectionConfig *mysql.ConnectionConfig
|
ApplierConnectionConfig *mysql.ConnectionConfig
|
||||||
|
ApplierMySQLVersion string
|
||||||
StartTime time.Time
|
StartTime time.Time
|
||||||
RowCopyStartTime time.Time
|
RowCopyStartTime time.Time
|
||||||
RowCopyEndTime time.Time
|
RowCopyEndTime time.Time
|
||||||
|
@ -70,14 +70,15 @@ func (this *Applier) InitDBConnections() (err error) {
|
|||||||
if err := this.readTableColumns(); err != nil {
|
if err := this.readTableColumns(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
log.Infof("Applier initiated on %+v, version %+v", this.connectionConfig.ImpliedKey, this.migrationContext.ApplierMySQLVersion)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// validateConnection issues a simple can-connect to MySQL
|
// validateConnection issues a simple can-connect to MySQL
|
||||||
func (this *Applier) validateConnection(db *gosql.DB) error {
|
func (this *Applier) validateConnection(db *gosql.DB) error {
|
||||||
query := `select @@global.port`
|
query := `select @@global.port, @@global.version`
|
||||||
var port int
|
var port int
|
||||||
if err := db.QueryRow(query).Scan(&port); err != nil {
|
if err := db.QueryRow(query).Scan(&port, &this.migrationContext.ApplierMySQLVersion); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if port != this.connectionConfig.Key.Port {
|
if port != this.connectionConfig.Key.Port {
|
||||||
|
@ -60,6 +60,7 @@ func (this *Inspector) InitDBConnections() (err error) {
|
|||||||
if err := this.applyBinlogFormat(); err != nil {
|
if err := this.applyBinlogFormat(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
log.Infof("Inspector initiated on %+v, version %+v", this.connectionConfig.ImpliedKey, this.migrationContext.InspectorMySQLVersion)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,9 +169,9 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {
|
|||||||
|
|
||||||
// validateConnection issues a simple can-connect to MySQL
|
// validateConnection issues a simple can-connect to MySQL
|
||||||
func (this *Inspector) validateConnection() error {
|
func (this *Inspector) validateConnection() error {
|
||||||
query := `select @@global.port`
|
query := `select @@global.port, @@global.version`
|
||||||
var port int
|
var port int
|
||||||
if err := this.db.QueryRow(query).Scan(&port); err != nil {
|
if err := this.db.QueryRow(query).Scan(&port, &this.migrationContext.InspectorMySQLVersion); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if port != this.connectionConfig.Key.Port {
|
if port != this.connectionConfig.Key.Port {
|
||||||
|
Loading…
Reference in New Issue
Block a user