Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Enable persistent connections for IbmDb2. #5314

Merged
merged 2 commits into from
Nov 21, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions library/Zend/Db/Adapter/Driver/IbmDb2/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,16 @@ public function connect()
return null;
};

$connection = array();
$connection['database'] = $findParameterValue(array('database', 'db'));
$connection['username'] = $findParameterValue(array('username', 'uid', 'UID'));
$connection['password'] = $findParameterValue(array('password', 'pwd', 'PWD'));
$connection['options'] = (isset($p['driver_options']) ? $p['driver_options'] : array());
$connection = array();
$connection['database'] = $findParameterValue(array('database', 'db'));
$connection['username'] = $findParameterValue(array('username', 'uid', 'UID'));
$connection['password'] = $findParameterValue(array('password', 'pwd', 'PWD'));
$connection['persistent'] = $findParameterValue(array('persistent', 'PERSISTENT', 'Persistent'));
$connection['options'] = (isset($p['driver_options']) ? $p['driver_options'] : array());

$this->resource = db2_connect(
$db2_connect = ($connection['persistent'] ? 'db2_pconnect' : 'db2_connect');

$this->resource = $db2_connect(
$connection['database'],
$connection['username'],
$connection['password'],
Expand Down