summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-01 15:22:32 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-01 15:22:32 +0100
commit891b7c6ea68a87127d51eb01b401a948f6ae3753 (patch)
treea375df9e412cc8ea8f29417471dbf32d81e2f9b8 /system/database/DB_driver.php
parentd6abf118dcf018bf9d3535410daadf1135ad6c05 (diff)
parent67f71a415c4bd7a206fcfc1a6007d74af4590883 (diff)
Merge upstream branch
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 0fe3dfc7e..483729677 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -236,7 +236,7 @@ class CI_DB_driver {
// Some DBs have functions that return the version, and don't run special
// SQL queries per se. In these instances, just return the result.
- if (in_array($this->dbdriver, array('oci8', 'sqlite', 'cubrid', 'pdo', 'mysqli'))
+ if (in_array($this->dbdriver, array('oci8', 'sqlite', 'cubrid', 'pdo', 'mysqli')))
{
return $sql;
}
@@ -620,7 +620,7 @@ class CI_DB_driver {
*/
public function is_write_type($sql)
{
- return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql);
+ return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|OPTIMIZE)\s+/i', $sql);
}
// --------------------------------------------------------------------