import v1.1.0_RC2 | 2009-09-20
This commit is contained in:
@ -15,9 +15,9 @@
|
||||
* @category Zend
|
||||
* @package Zend_Db
|
||||
* @subpackage Adapter
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Abstract.php 15577 2009-05-14 12:43:34Z matthew $
|
||||
* @version $Id: Abstract.php 16920 2009-07-21 13:32:28Z ralph $
|
||||
*/
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ require_once 'Zend/Db/Statement/Pdo.php';
|
||||
* @category Zend
|
||||
* @package Zend_Db
|
||||
* @subpackage Adapter
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
|
||||
@ -62,11 +62,12 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
|
||||
// baseline of DSN parts
|
||||
$dsn = $this->_config;
|
||||
|
||||
// don't pass the username, password, and driver_options in the DSN
|
||||
// don't pass the username, password, charset, persistent and driver_options in the DSN
|
||||
unset($dsn['username']);
|
||||
unset($dsn['password']);
|
||||
unset($dsn['options']);
|
||||
unset($dsn['charset']);
|
||||
unset($dsn['persistent']);
|
||||
unset($dsn['driver_options']);
|
||||
|
||||
// use all remaining parts in the DSN
|
||||
@ -114,6 +115,11 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
|
||||
// create PDO connection
|
||||
$q = $this->_profiler->queryStart('connect', Zend_Db_Profiler::CONNECT);
|
||||
|
||||
// add the persistence flag if we find it in our config array
|
||||
if (isset($this->_config['persistent']) && ($this->_config['persistent'] == true)) {
|
||||
$this->_config['driver_options'][PDO::ATTR_PERSISTENT] = true;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->_connection = new PDO(
|
||||
$dsn,
|
||||
|
Reference in New Issue
Block a user