Index: branches/5.3.x/core/install/install_toolkit.php =================================================================== diff -u -N -r15911 -r15919 --- branches/5.3.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 15911) +++ branches/5.3.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 15919) @@ -1,6 +1,6 @@ openConnection($this->lastUsedIndex); + + return $conn->getInsertID(); + } + + /** + * Returns row count affected by last query + * + * @return int + * @access public + */ + public function getAffectedRows() + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->getAffectedRows(); + } + + /** + * Returns LIMIT sql clause part for specific db + * + * @param int $offset + * @param int $rows + * @return string + * @access public + */ + public function getLimitClause($offset, $rows) + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->getLimitClause($offset, $rows); + } + + /** * If it's a string, adds quotes and backslashes (only work since PHP 4.3.0) * Otherwise returns as-is * @@ -628,6 +670,46 @@ } /** + * Escapes strings (only work since PHP 4.3.0) + * + * @param mixed $string + * @return string + * @access public + */ + public function escape($string) + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->escape($string); + } + + /** + * Returns last error code occurred + * + * @return int + * @access public + */ + public function getErrorCode() + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->getErrorCode(); + } + + /** + * Returns last error message + * + * @return string + * @access public + */ + public function getErrorMsg() + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->getErrorMsg(); + } + + /** * Performs insert of given data (useful with small number of queries) * or stores it to perform multiple insert later (useful with large number of queries) * @@ -662,6 +744,48 @@ } /** + * Allows to detect table's presence in database + * + * @param string $table_name + * @param bool $force + * @return bool + * @access public + */ + public function TableFound($table_name, $force = false) + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->TableFound($table_name, $force); + } + + /** + * Returns query processing statistics + * + * @return Array + * @access public + */ + public function getQueryStatistics() + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->getQueryStatistics(); + } + + /** + * Get status information from SHOW STATUS in an associative array + * + * @param string $which + * @return Array + * @access public + */ + public function getStatus($which = '%') + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->getStatus($which); + } + + /** * When undefined method is called, then send it directly to last used slave server connection * * @param string $name @@ -705,4 +829,17 @@ return $conn; } + + /** + * Get slave replication lag. It will only work if the DB user has the PROCESS privilege. + * + * @return int + * @access public + */ + public function getSlaveLag() + { + $conn =& $this->openConnection($this->lastUsedIndex); + + return $conn->getSlaveLag(); + } } Index: branches/5.3.x/core/kernel/application.php =================================================================== diff -u -N -r15911 -r15919 --- branches/5.3.x/core/kernel/application.php (.../application.php) (revision 15911) +++ branches/5.3.x/core/kernel/application.php (.../application.php) (revision 15919) @@ -1,6 +1,6 @@ hasError(); } - - /** * Returns auto increment field value from * insert like operation if any, zero otherwise