}
}
+ # Keep track of whether the transaction has write queries pending
+ if ( $this->mTrxLevel && !$this->mTrxDoneWrites && $this->isWriteQuery( $sql ) ) {
+ $this->mTrxDoneWrites = true;
+ Profiler::instance()->transactionWritingIn( $this->mServer, $this->mDBname );
+ }
+
$isMaster = !is_null( $this->getLBInfo( 'master' ) );
if ( !Profiler::instance()->isStub() ) {
# generalizeSQL will probably cut down the query to reasonable
wfProfileIn( $queryProf );
}
- # Keep track of whether the transaction has write queries pending
- if ( $this->mTrxLevel && !$this->mTrxDoneWrites && $this->isWriteQuery( $sql ) ) {
- $this->mTrxDoneWrites = true;
- Profiler::instance()->transactionWritingIn( $this->mServer, $this->mDBname );
- }
-
if ( $this->debug() ) {
static $cnt = 0;