Index: branches/unlabeled/unlabeled-1.19.2/core/kernel/db/db_connection.php =================================================================== diff -u -N -r8111 -r8607 --- branches/unlabeled/unlabeled-1.19.2/core/kernel/db/db_connection.php (.../db_connection.php) (revision 8111) +++ branches/unlabeled/unlabeled-1.19.2/core/kernel/db/db_connection.php (.../db_connection.php) (revision 8607) @@ -13,23 +13,23 @@ * @access private */ var $dbType = 'mysql'; - + /** * Created connection handle * * @var resource * @access private */ var $connectionID = null; - + /** * Handle of currenty processed recordset * * @var resource * @access private */ var $queryID = null; - + /** * DB type specific function mappings * @@ -53,7 +53,7 @@ * @access private */ var $errorCode = 0; - + /** * Error message * @@ -77,7 +77,7 @@ * @var string */ var $lastQuery = ''; - + /** * Initializes connection class with * db type to used in future @@ -157,7 +157,7 @@ /*if (!isset($this->metaFunctions[$name])) { $this->metaFunctions[$name] = $name; }*/ - + return $this->dbType.'_'.$name; } @@ -181,6 +181,11 @@ if (defined('DBG_SQL_MODE')) { $this->Query('SET sql_mode = \''.DBG_SQL_MODE.'\''); } + + if (defined('SQL_COLLATION') && defined('SQL_CHARSET')) { + $this->Query('SET NAMES \''.SQL_CHARSET.'\' COLLATE \''.SQL_COLLATION.'\''); + } + $this->setDB($db); $this->showError(); } @@ -402,7 +407,9 @@ } // set 2nd checkpoint: begin if(!$isSkipTable) { - $debugger->profileFinish('sql_'.$queryID); + $first_cell = count($ret) == 1 && count(current($ret)) == 1 ? current(current($ret)) : null; + + $debugger->profileFinish('sql_'.$queryID, null, null, $this->getAffectedRows(), $first_cell); $debugger->profilerAddTotal('sql', 'sql_'.$queryID); } $this->Destroy(); @@ -412,7 +419,7 @@ else { // set 2nd checkpoint: begin if(!$isSkipTable) { - $debugger->profileFinish('sql_'.$queryID); + $debugger->profileFinish('sql_'.$queryID, null, null, $this->getAffectedRows()); $debugger->profilerAddTotal('sql', 'sql_'.$queryID); } // set 2nd checkpoint: end @@ -572,7 +579,7 @@ return $this->ChangeQuery($sql); } - + /** * Allows to detect table's presense in database * @@ -582,15 +589,15 @@ function TableFound($table_name) { static $table_found = Array(); - + if (!preg_match('/^'.preg_quote(TABLE_PREFIX, '/').'(.*)/', $table_name)) { $table_name = TABLE_PREFIX.$table_name; } - + if (!isset($table_found[$table_name])) { $table_found[$table_name] = $this->Query('SHOW TABLES LIKE "'.$table_name.'"'); } - + return $table_found[$table_name]; } }