$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;
}