Skip to content
Browse files

Merge pull request #1058 from cebe/1000-cdbcommand-profiling-params

added params to profiling token, on paramlogging
  • Loading branch information...
2 parents 30b1d6e + 691550b commit 53b1ab426e79ccc6d9992ad8ca48b165f6ff86ec @qiangxue qiangxue committed Jul 29, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −0 CHANGELOG
  2. +3 −3 framework/db/CDbCommand.php
View
1 CHANGELOG
@@ -36,6 +36,7 @@ Version 1.1.11 work in progress
- Bug #865: CLogRoute called processLogs() even if log array was empty and caused empty emails and log files (cebe)
- Bug #879: Fixed a possible PHP error caused by CWebUser::restoreFromCookie() in combination with CHttpRequest.enableCookieValidation (kidol)
- Bug #901: Fixed possible encoding problem on exception (mdomba, samdark, cebe)
+- Bug #1000: Added params to profiling token in CDbCommand::execute() to be consitent with CDbCommand::queryInternal() (cebe)
- Bug #1045: Building a query with empty array as parameter will not result in a broken sql-string anymore(suralc)
- Bug: Fixed CMenu::isItemActive() to work properly when there is a hash in the item's url (SlKelevro)
- Bug: Added missing return statement to CAuthItem->revoke() (mdomba)
View
6 framework/db/CDbCommand.php
@@ -327,7 +327,7 @@ public function execute($params=array())
try
{
if($this->_connection->enableProfiling)
- Yii::beginProfile('system.db.CDbCommand.execute('.$this->getText().')','system.db.CDbCommand.execute');
+ Yii::beginProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
$this->prepare();
if($params===array())
@@ -337,14 +337,14 @@ public function execute($params=array())
$n=$this->_statement->rowCount();
if($this->_connection->enableProfiling)
- Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().')','system.db.CDbCommand.execute');
+ Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
return $n;
}
catch(Exception $e)
{
if($this->_connection->enableProfiling)
- Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().')','system.db.CDbCommand.execute');
+ Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
$errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
$message = $e->getMessage();
Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',

0 comments on commit 53b1ab4

Please sign in to comment.
Something went wrong with that request. Please try again.