master_pos_wait is now OK to return NULL. We only care if it returns with -1

This commit is contained in:
Shlomi Noach 2016-05-18 15:08:47 +02:00
parent 079f1c0f98
commit ec34a5ef75
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
#
RELEASE_VERSION="0.7.4"
RELEASE_VERSION="0.7.5"
buildpath=/tmp/gh-ost
target=gh-ost

View File

@ -552,7 +552,7 @@ func (this *Applier) StopSlaveIOThread() error {
// MasterPosWait is applicable with --test-on-replica
func (this *Applier) MasterPosWait(binlogCoordinates *mysql.BinlogCoordinates) error {
var appliedRows int64
if err := this.db.QueryRow(`select master_pos_wait(?, ?, ?)`, binlogCoordinates.LogFile, binlogCoordinates.LogPos, 1).Scan(&appliedRows); err != nil {
if err := this.db.QueryRow(`select ifnull(master_pos_wait(?, ?, ?), 0)`, binlogCoordinates.LogFile, binlogCoordinates.LogPos, 1).Scan(&appliedRows); err != nil {
return err
}
if appliedRows < 0 {