From: Krinkle Date: Fri, 15 Mar 2019 01:16:53 +0000 (+0000) Subject: Merge "rdbms: make Database::query() more readable and consistent" X-Git-Tag: 1.34.0-rc.0~2513 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=e894410badc1dd67b15c65419dff30b950dce911;p=lhc%2Fweb%2Fwiklou.git Merge "rdbms: make Database::query() more readable and consistent" --- e894410badc1dd67b15c65419dff30b950dce911 diff --cc includes/libs/rdbms/database/Database.php index 13bf8f023e,19195b4173..224bcf29d0 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@@ -1277,12 -1288,16 +1287,12 @@@ abstract class Database implements IDat $this->affectedRowCount = null; $ret = $this->doQuery( $commentedSql ); $this->affectedRowCount = $this->affectedRows(); - if ( $this->profiler ) { - $this->profiler->profileOut( $queryProf ); - } + unset( $ps ); // profile out (if set) $queryRuntime = max( microtime( true ) - $startTime, 0.0 ); - unset( $queryProfSection ); // profile out (if set) - if ( $ret !== false ) { $this->lastPing = $startTime; - if ( $isWrite && $this->trxLevel ) { + if ( $isEffectiveWrite && $this->trxLevel ) { $this->updateTrxWriteQueryTime( $sql, $queryRuntime, $this->affectedRows() ); $this->trxWriteCallers[] = $fname; }