From 49f7b729b3633d7f29029b7800dde5cc47a022c8 Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Mon, 20 Aug 2012 18:52:21 +0200 Subject: mysql driver updated --- system/database/drivers/mysql/mysql_driver.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/mysql') diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 29db90408..35473016f 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -83,7 +83,14 @@ class CI_DB_mysql_driver extends CI_DB { */ public function db_connect() { - return @mysql_connect($this->hostname, $this->username, $this->password, TRUE); + if ($this->compress === TRUE) + { + return @mysql_connect($this->hostname, $this->username, $this->password, TRUE, MYSQL_CLIENT_COMPRESS); + } + else + { + return @mysql_connect($this->hostname, $this->username, $this->password, TRUE); + } } // -------------------------------------------------------------------- @@ -95,7 +102,14 @@ class CI_DB_mysql_driver extends CI_DB { */ public function db_pconnect() { - return @mysql_pconnect($this->hostname, $this->username, $this->password); + if ($this->compress === TRUE) + { + return @mysql_pconnect($this->hostname, $this->username, $this->password, MYSQL_CLIENT_COMPRESS); + } + else + { + return @mysql_pconnect($this->hostname, $this->username, $this->password); + } } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 2ea33c37e9bfa3ff0e029c18a0d2c9ef05016bf0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Oct 2012 12:37:51 +0300 Subject: Fix issue #1789 Signed-off-by: Andrey Andreev --- system/database/drivers/mysql/mysql_driver.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'system/database/drivers/mysql') diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 35473016f..6b4d84dfb 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -45,10 +45,6 @@ class CI_DB_mysql_driver extends CI_DB { // The character used for escaping protected $_escape_char = '`'; - // clause and character used for LIKE escape sequences - not used in MySQL - protected $_like_escape_str = ''; - protected $_like_escape_chr = '\\'; - protected $_random_keyword = ' RAND()'; // database specific random keyword /** -- cgit v1.2.3-24-g4f1b From 7eaa14f144f9aeab8fc388b6bed3390e5f815508 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Oct 2012 11:34:01 +0300 Subject: Alter fix for issue #1257 --- system/database/drivers/mysql/mysql_driver.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'system/database/drivers/mysql') diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 6b4d84dfb..98311872b 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -464,6 +464,26 @@ class CI_DB_mysql_driver extends CI_DB { // -------------------------------------------------------------------- + /** + * FROM tables + * + * Groups tables in FROM clauses if needed, so there is no confusion + * about operator precedence. + * + * @return string + */ + protected function _from_tables() + { + if ( ! empty($this->qb_join) && count($this->qb_from) > 0) + { + return '('.implode(', ', $this->qb_from).')'; + } + + return implode(', ', $this->qb_from); + } + + // -------------------------------------------------------------------- + /** * Close DB Connection * -- cgit v1.2.3-24-g4f1b From fce9abe379cd273262d5e3dcbbb169ffd090506a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Oct 2012 11:37:00 +0300 Subject: Really fix that FROM group condition --- system/database/drivers/mysql/mysql_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/drivers/mysql') diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 98311872b..7262591ee 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -474,7 +474,7 @@ class CI_DB_mysql_driver extends CI_DB { */ protected function _from_tables() { - if ( ! empty($this->qb_join) && count($this->qb_from) > 0) + if ( ! empty($this->qb_join) && count($this->qb_from) > 1) { return '('.implode(', ', $this->qb_from).')'; } -- cgit v1.2.3-24-g4f1b