summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-06-22 12:01:51 +0200
committerAndrey Andreev <narf@devilix.net>2016-06-22 12:01:51 +0200
commitac718628e8b486f8016ac775829a32cfbc9fa3da (patch)
tree4f3438f9a3b51ca49f0726572fee7e5cd8e7dbb0 /system
parentf7b028bf6db9c298db99cf800777ad3691b206b5 (diff)
Fix #4674
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php5
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php7
2 files changed, 10 insertions, 2 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index c6f84e0f9..c27607e55 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -126,7 +126,10 @@ class CI_DB_pdo_driver extends CI_DB {
*/
public function db_connect($persistent = FALSE)
{
- $this->options[PDO::ATTR_PERSISTENT] = $persistent;
+ if ($persistent === TRUE)
+ {
+ $this->options[PDO::ATTR_PERSISTENT] = TRUE;
+ }
try
{
diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
index 84695ee9b..9a1cbcaf4 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
@@ -126,7 +126,12 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver {
*/
public function db_connect($persistent = FALSE)
{
- $this->conn_id = parent::db_connect($persistent);
+ if ($persistent === TRUE)
+ {
+ log_message('debug', "dblib driver doesn't support persistent connections");
+ }
+
+ $this->conn_id = parent::db_connect(FALSE);
if ( ! is_object($this->conn_id))
{