Index: branches/5.1.x/core/kernel/db/db_connection.php =================================================================== diff -u -N -r13086 -r13168 --- branches/5.1.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 13086) +++ branches/5.1.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 13168) @@ -1,6 +1,6 @@ profileFinish('sql_'.$queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount); + $first_cell = count($ret) == 1 && count(current($ret)) == 1 ? current(current($ret)) : null; + $debugger->profileFinish('sql_'.$queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount, $this->nextQueryCachable); $debugger->profilerAddTotal('sql', 'sql_'.$queryID); + $this->nextQueryCachable = false; } // set 2nd checkpoint: end @@ -502,8 +510,9 @@ else { // set 2nd checkpoint: begin if ($profileSQLs) { - $debugger->profileFinish('sql_'.$queryID, null, null, $this->getAffectedRows(), null, $this->_queryCount); + $debugger->profileFinish('sql_'.$queryID, null, null, $this->getAffectedRows(), null, $this->_queryCount, $this->nextQueryCachable); $debugger->profilerAddTotal('sql', 'sql_'.$queryID); + $this->nextQueryCachable = false; } // set 2nd checkpoint: end }