summaryrefslogtreecommitdiffstats
path: root/system/database/DB_forge.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-12-06 12:04:01 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-12-06 12:04:01 +0100
commit40fab414fdfefeeef3da9bb87658f365c005bd2b (patch)
treeb6a8453dae3efbdab72d02f45256320ba3465158 /system/database/DB_forge.php
parentf9ff3afd28fbd5539a1081f25b83766369d78267 (diff)
parentc9fc88c09c1a0accdddd3710907fee2f5b42d7ad (diff)
Merge pull request #735 from tomasz154/develop
Made an "innocuous SQL statement" more innocuous SELECT * FROM was running in the PostgreSQL drivers just for the sake of returning valid SQL, which could of course be insanely slow on large tables.
Diffstat (limited to 'system/database/DB_forge.php')
-rw-r--r--system/database/DB_forge.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 1aa2334ea..78bf77a9f 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -205,6 +205,12 @@ class CI_DB_forge {
$sql = $this->_create_table($this->db->dbprefix.$table, $this->fields, $this->primary_keys, $this->keys, $if_not_exists);
$this->_reset();
+
+ if (is_bool($sql))
+ {
+ return $sql;
+ }
+
return $this->db->query($sql);
}