diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-12-06 12:04:01 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-12-06 12:04:01 +0100 |
commit | 40fab414fdfefeeef3da9bb87658f365c005bd2b (patch) | |
tree | b6a8453dae3efbdab72d02f45256320ba3465158 /system/database/DB_forge.php | |
parent | f9ff3afd28fbd5539a1081f25b83766369d78267 (diff) | |
parent | c9fc88c09c1a0accdddd3710907fee2f5b42d7ad (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.php | 6 |
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); } |