summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_driver.php6
-rw-r--r--system/database/drivers/mysql/mysql_driver.php3
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php3
-rw-r--r--user_guide_src/source/changelog.rst4
4 files changed, 8 insertions, 8 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index a04a65eeb..12cd3917c 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -165,7 +165,7 @@ class CI_DB_driver {
}
// Now we set the character set and that's all
- return $this->db_set_charset($this->char_set, $this->dbcollat);
+ return $this->db_set_charset($this->char_set);
}
// --------------------------------------------------------------------
@@ -177,9 +177,9 @@ class CI_DB_driver {
* @param string
* @return bool
*/
- public function db_set_charset($charset, $collation = '')
+ public function db_set_charset($charset)
{
- if (method_exists($this, '_db_set_charset') && ! $this->_db_set_charset($charset, $collation))
+ if (method_exists($this, '_db_set_charset') && ! $this->_db_set_charset($charset))
{
log_message('error', 'Unable to set database connection charset: '.$charset);
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index 071ce4327..ba646d226 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -144,10 +144,9 @@ class CI_DB_mysql_driver extends CI_DB {
* Set client character set
*
* @param string
- * @param string
* @return bool
*/
- protected function _db_set_charset($charset, $collation)
+ protected function _db_set_charset($charset)
{
return @mysql_set_charset($charset, $this->conn_id);
}
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index e84b8346d..f38b94c13 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -144,10 +144,9 @@ class CI_DB_mysqli_driver extends CI_DB {
* Set client character set
*
* @param string
- * @param string
* @return bool
*/
- protected function _db_set_charset($charset, $collation)
+ protected function _db_set_charset($charset)
{
return @mysqli_set_charset($this->conn_id, $charset);
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 5bea3500f..1f148e9d4 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -68,6 +68,8 @@ Release Date: Not Released
- Added a constructor to the DB_result class and moved all driver-specific properties and logic out of the base DB_driver class to allow better abstraction.
- Removed limit() and order_by() support for UPDATE and DELETE queries in PostgreSQL driver. Postgres does not support those features.
- Removed protect_identifiers() and renamed _protect_identifiers() to it instead - it was just an alias.
+ - MySQL and MySQLi drivers now require at least MySQL version 5.1.
+ - db_set_charset() now only requires one parameter (collation was only needed due to legacy support for MySQL versions prior to 5.1).
- Libraries
@@ -141,7 +143,7 @@ Bug fixes for 3.0
- Fixed a bug in PDO's _version() method where it used to return the client version as opposed to the server one.
- Fixed a bug in PDO's insert_id() method where it could've failed if it's used with Postgre versions prior to 8.1.
- Fixed a bug in CUBRID's affected_rows() method where a connection resource was passed to cubrid_affected_rows() instead of a result.
-- Fixed a bug (#638) - db_set_charset() ignored its arguments and always used the configured charset and collation instead.
+- Fixed a bug (#638) - db_set_charset() ignored its arguments and always used the configured charset instead.
- Fixed a bug (#413) - Oracle's error handling methods used to only return connection-related errors.
- Fixed a bug (#804) - Profiler library was trying to handle objects as strings in some cases, resulting in warnings being issued by htmlspecialchars().
- Fixed a bug (#1101) - MySQL/MySQLi result method field_data() was implemented as if it was handling a DESCRIBE result instead of the actual result set.