Skip to content

Commit ec34a5e

Browse files
author
Shlomi Noach
committed
master_pos_wait is now OK to return NULL. We only care if it returns with -1
1 parent 079f1c0 commit ec34a5e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
#
33
#
4-
RELEASE_VERSION="0.7.4"
4+
RELEASE_VERSION="0.7.5"
55

66
buildpath=/tmp/gh-ost
77
target=gh-ost

go/logic/applier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ func (this *Applier) StopSlaveIOThread() error {
552552
// MasterPosWait is applicable with --test-on-replica
553553
func (this *Applier) MasterPosWait(binlogCoordinates *mysql.BinlogCoordinates) error {
554554
var appliedRows int64
555-
if err := this.db.QueryRow(`select master_pos_wait(?, ?, ?)`, binlogCoordinates.LogFile, binlogCoordinates.LogPos, 1).Scan(&appliedRows); err != nil {
555+
if err := this.db.QueryRow(`select ifnull(master_pos_wait(?, ?, ?), 0)`, binlogCoordinates.LogFile, binlogCoordinates.LogPos, 1).Scan(&appliedRows); err != nil {
556556
return err
557557
}
558558
if appliedRows < 0 {

0 commit comments

Comments
 (0)