summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 19afdd492..0b13a2f82 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -916,6 +916,7 @@ abstract class CI_DB_driver {
if ($this->_trans_begin())
{
+ $this->_trans_status = TRUE;
$this->_trans_depth++;
return TRUE;
}
@@ -1044,7 +1045,7 @@ abstract class CI_DB_driver {
*/
public function is_write_type($sql)
{
- return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', $sql);
+ return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX|MERGE)\s/i', $sql);
}
// --------------------------------------------------------------------
@@ -1173,14 +1174,14 @@ abstract class CI_DB_driver {
// --------------------------------------------------------------------
/**
- * Platform-dependant string escape
+ * Platform-dependent string escape
*
* @param string
* @return string
*/
protected function _escape_str($str)
{
- return str_replace("'", "''", remove_invisible_characters($str));
+ return str_replace("'", "''", remove_invisible_characters($str, FALSE));
}
// --------------------------------------------------------------------