mysql driver updated
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 475857c..947c477 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -67,10 +67,12 @@
 	{
 		if ($this->compress === TRUE)
 		{
-			$port = NULL;
+			$port = empty($this->port) ? NULL : $this->port;
 
-			$mysqli = mysqli_init();
-			return $mysqli->real_connect($this->hostname, $this->username, $this->password, $this->database, $port, NULL, MYSQLI_CLIENT_COMPRESS);
+			$link = mysqli_init();
+			$link->real_connect($this->hostname, $this->username, $this->password, $this->database, $port, NULL, MYSQLI_CLIENT_COMPRESS);
+
+			return $link;
 		}
 
 		return empty($this->port)