Merge "Return correct values and types"
[lhc/web/wiklou.git] / includes / db / DatabaseMysqlBase.php
index 273cd8f..7bf247f 100644 (file)
@@ -681,7 +681,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
 
                # 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 );
 
@@ -940,8 +940,8 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
         * @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
@@ -1256,4 +1256,11 @@ class MySQLMasterPos implements DBMasterPos {
 
                return ( $thisPos && $thatPos && $thisPos >= $thatPos );
        }
+
+       /**
+        * @return int
+        */
+       public function getMasterPos() {
+               return $this->pos;
+       }
 }