summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-09-27 22:38:06 +0200
committerFlorian Pritz <bluewind@xinu.at>2019-09-27 22:38:06 +0200
commit9067e097cc335b4ec207d7c8c6a819741446a163 (patch)
tree3770e3d890ae5d968a1873ff55c40cedcc5a88af /system/database/drivers/pdo
parent3db68e2e947b6299a15ed5277b65b49ad1768415 (diff)
parentb73eb19aed66190c10c9cad476da7c36c271d6dc (diff)
Merge tag '3.1.11' of git://github.com/bcit-ci/CodeIgniter into dev
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'system/database/drivers/pdo')
-rw-r--r--system/database/drivers/pdo/pdo_result.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_oci_forge.php7
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php2
6 files changed, 12 insertions, 5 deletions
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_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
index 54752f153..eceb59796 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
@@ -150,7 +150,7 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge {
if ( ! empty($field[$i]['default']))
{
$sqls[] = $sql.' ALTER COLUMN '.$this->db->escape_identifiers($field[$i]['name'])
- .' SET DEFAULT '.$field[$i]['default'];
+ .' SET '.$field[$i]['default'];
}
if (isset($field[$i]['null']))
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_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
index 0abda5930..b5d3eb143 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
@@ -74,6 +74,13 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge {
*/
protected $_unsigned = FALSE;
+ /**
+ * NULL value representation in CREATE/ALTER TABLE statements
+ *
+ * @var string
+ */
+ protected $_null = 'NULL';
+
// --------------------------------------------------------------------
/**
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;
}
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
index ff7a11075..a4ccff407 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
@@ -130,7 +130,7 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge {
if ( ! empty($field[$i]['default']))
{
$sqls[] = $sql.' ALTER COLUMN '.$this->db->escape_identifiers($field[$i]['name'])
- .' SET DEFAULT '.$field[$i]['default'];
+ .' SET '.$field[$i]['default'];
}
if (isset($field[$i]['null']))