Merge "Fix IDatabase::affectedRows() documentation"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 17 Aug 2019 01:41:08 +0000 (01:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 17 Aug 2019 01:41:08 +0000 (01:41 +0000)
includes/libs/rdbms/database/IDatabase.php

index f7f87a2..8768213 100644 (file)
@@ -430,8 +430,10 @@ interface IDatabase {
        public function lastError();
 
        /**
-        * Get the number of rows affected by the last write query
-        * @see https://www.php.net/mysql_affected_rows
+        * Get the number of rows affected by the last write query.
+        * Similar to https://www.php.net/mysql_affected_rows but includes rows matched
+        * but not changed (ie. an UPDATE which sets all fields to the same value they already have).
+        * To get the old mysql_affected_rows behavior, include non-equality of the fields in WHERE.
         *
         * @return int
         */