Issue 1778: DB Classes: Add prepared statements support - Added new config option in db.config.php to decide if prepared statments should be used or not. Default is Yes.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10474 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2012-03-26 11:41:59 +00:00
parent 77c77bee34
commit 563774c2d2
4 changed files with 13 additions and 1 deletions

View file

@ -239,7 +239,12 @@ class Context {
$oInstallController = &getController('install');
$oInstallController->makeConfigFile();
}
if(!$db_info->use_prepared_statements)
{
$db_info->use_prepared_statements = 'Y';
}
if(!$db_info->time_zone) $db_info->time_zone = date('O');
$GLOBALS['_time_zone'] = $db_info->time_zone;

View file

@ -82,6 +82,8 @@
var $db_type; ///< stores database type: 'mysql','cubrid','mssql' etc. or 'db' when database is not yet set
var $use_prepared_statements; ///< flag to decide if class prepared statements or not (when supported); can be changed from db.config.info
/**
* @brief returns instance of certain db type
* @param[in] $db_type type of db
@ -762,6 +764,7 @@
else
$this->slave_db = $db_info->slave_db;
$this->prefix = $db_info->master_db["db_table_prefix"];
$this->use_prepared_statements = $db_info->use_prepared_statements;
}
function __connect(){

View file

@ -6,6 +6,8 @@
* @version 0.1
*
* mysql handling class
*
* Does not use prepared statements, since mysql driver does not support them
**/
class DBMysql extends DB {

View file

@ -8,6 +8,8 @@
* @version 0.1
*
* mysql innodb handling class
*
* Does not use prepared statements since the mysql driver does not support them
**/
class DBMysql_innodb extends DBMysql {