summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2019-09-19 18:54:50 +0200
committerAndrey Andreev <narf@devilix.net>2019-09-19 18:54:50 +0200
commit85817aa7abc1a877cc9e0e39dcda2a6811ecc1fd (patch)
treeca736243cb68029d7ebf95dfcc11ffb3f2bcae83 /system/database
parentfdb85f52096460b2488a036cb6145861cc577da1 (diff)
parentf4502e4ad6d8a595e472b85a5e0bc3f552b63306 (diff)
Merge branch '3.1-stable' into develop
Conflicts resolved: system/core/CodeIgniter.php system/libraries/Cache/drivers/Cache_redis.php system/libraries/Session/drivers/Session_redis_driver.php user_guide_src/source/changelog.rst user_guide_src/source/conf.py user_guide_src/source/installation/downloads.rst user_guide_src/source/installation/upgrading.rst
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_result.php2
-rw-r--r--system/database/drivers/mysql/mysql_driver.php2
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php2
-rw-r--r--system/database/drivers/pdo/pdo_result.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php2
6 files changed, 6 insertions, 6 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 0dbac1633..ed5252d49 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -381,7 +381,7 @@ class CI_DB_result {
*/
public function custom_row_object($n, $type)
{
- isset($this->custom_result_object[$type]) OR $this->custom_result_object($type);
+ isset($this->custom_result_object[$type]) OR $this->custom_result_object[$type] = $this->custom_result_object($type);
if (count($this->custom_result_object[$type]) === 0)
{
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index 388a46c82..bdd80092c 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -382,7 +382,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
protected function _list_tables($prefix_limit = FALSE)
{
- $sql = 'SHOW TABLES FROM '.$this->escape_identifiers($this->database);
+ $sql = 'SHOW TABLES FROM '.$this->_escape_char.$this->database.$this->_escape_char;
if ($prefix_limit !== FALSE && $this->dbprefix !== '')
{
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 4f0c28e78..6553a271f 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -423,7 +423,7 @@ class CI_DB_mysqli_driver extends CI_DB {
*/
protected function _list_tables($prefix_limit = FALSE)
{
- $sql = 'SHOW TABLES FROM '.$this->escape_identifiers($this->database);
+ $sql = 'SHOW TABLES FROM '.$this->_escape_char.$this->database.$this->_escape_char;
if ($prefix_limit !== FALSE && $this->dbprefix !== '')
{
diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php
index 03c0f9f9d..b3973da46 100644
--- a/system/database/drivers/pdo/pdo_result.php
+++ b/system/database/drivers/pdo/pdo_result.php
@@ -133,7 +133,7 @@ class CI_DB_pdo_result extends CI_DB_result {
$retval[$i] = new stdClass();
$retval[$i]->name = $field['name'];
- $retval[$i]->type = $field['native_type'];
+ $retval[$i]->type = isset($field['native_type']) ? $field['native_type'] : null;
$retval[$i]->max_length = ($field['len'] > 0) ? $field['len'] : NULL;
$retval[$i]->primary_key = (int) ( ! empty($field['flags']) && in_array('primary_key', $field['flags'], TRUE));
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
index 26bc30e14..73b88bcfd 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
@@ -279,7 +279,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
*/
protected function _list_tables($prefix_limit = FALSE)
{
- $sql = 'SHOW TABLES';
+ $sql = 'SHOW TABLES FROM '.$this->_escape_char.$this->database.$this->_escape_char;
if ($prefix_limit === TRUE && $this->dbprefix !== '')
{
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
index b05d473ee..2d0c74b2e 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
@@ -98,7 +98,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver {
if ( ! empty($this->username))
{
- $this->dsn .= ';username='.$this->username;
+ $this->dsn .= ';user='.$this->username;
empty($this->password) OR $this->dsn .= ';password='.$this->password;
}
}