diff --git a/build.sh b/build.sh index 2df3f43..d6c3c43 100644 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash # # -RELEASE_VERSION="0.9.0" +RELEASE_VERSION="0.9.1" buildpath=/tmp/gh-ost target=gh-ost diff --git a/go/logic/applier.go b/go/logic/applier.go index 9262adc..55b4773 100644 --- a/go/logic/applier.go +++ b/go/logic/applier.go @@ -558,6 +558,17 @@ func (this *Applier) StopSlaveIOThread() error { return nil } +// StartSlaveSQLThread is applicable with --test-on-replica +func (this *Applier) StopSlaveSQLThread() error { + query := `stop /* gh-ost */ slave sql_thread` + log.Infof("Verifying SQL thread is stopped") + if _, err := sqlutils.ExecNoPrepare(this.db, query); err != nil { + return err + } + log.Infof("SQL thread stopped") + return nil +} + // StartSlaveSQLThread is applicable with --test-on-replica func (this *Applier) StartSlaveSQLThread() error { query := `start /* gh-ost */ slave sql_thread` @@ -573,7 +584,7 @@ func (this *Applier) StopSlaveNicely() error { if err := this.StopSlaveIOThread(); err != nil { return err } - if err := this.StartSlaveSQLThread(); err != nil { + if err := this.StopSlaveSQLThread(); err != nil { return err } readBinlogCoordinates, executeBinlogCoordinates, err := mysql.GetReplicationBinlogCoordinates(this.db)