Change-Id: Id6268193d08737e2599ec84496527b3be348dfda
# Call doQuery() directly, to avoid opening a transaction if DBO_TRX is set
$encFile = $this->addQuotes( $pos->file );
- $encPos = intval( $pos->pos );
+ $encPos = intval( $pos->getMasterPos() );
$sql = "SELECT MASTER_POS_WAIT($encFile, $encPos, $timeout)";
$res = $this->doQuery( $sql );
return ( $thisPos && $thatPos && $thisPos >= $thatPos );
}
+
+ /**
+ * @return int
+ */
+ public function getMasterPos() {
+ return $this->pos;
+ }
}
* An object representing a master or slave position in a replicated setup.
*/
interface DBMasterPos {
+ /**
+ * Return the master position.
+ *
+ * @return mixed Master position
+ */
+ public function getMasterPos();
}