summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/subdrivers
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/pdo/subdrivers')
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php7
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php4
2 files changed, 9 insertions, 2 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
index 9ffb93eed..0fb5d8f12 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
@@ -41,6 +41,7 @@
class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
public $subdriver = 'mysql';
+ public $compress = FALSE;
protected $_escape_char = '`';
@@ -79,6 +80,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
*
* @param bool
* @return object
+ * @todo SSL support
*/
public function db_connect($persistent = FALSE)
{
@@ -93,6 +95,11 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
.(empty($this->dbcollat) ? '' : ' COLLATE '.$this->dbcollat);
}
+ if ($this->compress === TRUE)
+ {
+ $this->options[PDO::MYSQL_ATTR_COMPRESS] = TRUE;
+ }
+
return parent::db_connect($persistent);
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
index 5b1cd9789..64be355f8 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
@@ -78,9 +78,9 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver {
$this->dsn .= ';ConnectionPooling='.$this->ConnectionPooling;
}
- if (isset($this->Encrypt))
+ if ($this->encrypt === TRUE)
{
- $this->dsn .= ';Encrypt='.$this->Encrypt;
+ $this->dsn .= ';Encrypt=1';
}
if (isset($this->TraceOn))