# 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 );
* @param string $fname
* @return bool
*/
- public function upsert(
- $table, array $rows, array $uniqueIndexes, array $set, $fname = __METHOD__
+ public function upsert( $table, array $rows, array $uniqueIndexes,
+ array $set, $fname = __METHOD__
) {
if ( !count( $rows ) ) {
return true; // nothing to do
return ( $thisPos && $thatPos && $thisPos >= $thatPos );
}
+
+ /**
+ * @return int
+ */
+ public function getMasterPos() {
+ return $this->pos;
+ }
}