driver fix + userguide + changelog
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 947c477..9558dfd 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -65,14 +65,15 @@
 	 */
 	public function db_connect()
 	{
+		// Use MySQL client compression?
 		if ($this->compress === TRUE)
 		{
 			$port = empty($this->port) ? NULL : $this->port;
 
-			$link = mysqli_init();
-			$link->real_connect($this->hostname, $this->username, $this->password, $this->database, $port, NULL, MYSQLI_CLIENT_COMPRESS);
+			$mysqli = mysqli_init();
+			$mysqli->real_connect($this->hostname, $this->username, $this->password, $this->database, $port, NULL, MYSQLI_CLIENT_COMPRESS);
 
-			return $link;
+			return $mysqli;
 		}
 
 		return empty($this->port)
@@ -95,6 +96,17 @@
 			return $this->db_connect();
 		}
 
+		// Use MySQL client compression?
+		if ($this->compress === TRUE)
+		{
+			$port = empty($this->port) ? NULL : $this->port;
+
+			$mysqli = mysqli_init();
+			$mysqli->real_connect('p:'.$this->hostname, $this->username, $this->password, $this->database, $port, NULL, MYSQLI_CLIENT_COMPRESS);
+
+			return $mysqli;
+		}
+
 		return empty($this->port)
 			? @new mysqli('p:'.$this->hostname, $this->username, $this->password, $this->database)
 			: @new mysqli('p:'.$this->hostname, $this->username, $this->password, $this->database, $this->port);