Disabled automatic transactions for now
authorAlexander Ebert <ebert@woltlab.com>
Thu, 15 Dec 2011 15:34:15 +0000 (16:34 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 15 Dec 2011 15:34:15 +0000 (16:34 +0100)
wcfsetup/install/files/lib/system/database/statement/PreparedStatement.class.php

index 1bc7265db7aec376bd28dc3682ae0aa76b4028ab..1e036ab3a27a194d9f683f3824880dde56ed058f 100644 (file)
@@ -78,13 +78,14 @@ class PreparedStatement {
        
        /**
         * Executes a prepared statement within a transaction.
+        * CAUTION: Transactions disabled for now, use manual transaction if you like
         *
         * @param       array           $parameters
         */
        public function execute(array $parameters = array()) {
                $this->parameters = $parameters;
                $this->database->incrementQueryCount();
-               $this->database->beginTransaction();
+               //$this->database->beginTransaction();
                
                try {
                        if (WCF::benchmarkIsEnabled()) Benchmark::getInstance()->start($this->query, Benchmark::TYPE_SQL_QUERY);
@@ -94,10 +95,10 @@ class PreparedStatement {
                        
                        if (WCF::benchmarkIsEnabled()) Benchmark::getInstance()->stop();
                        
-                       $this->database->commitTransaction();
+                       //$this->database->commitTransaction();
                }
                catch (\PDOException $e) {
-                       $this->database->rollBackTransaction();
+                       //$this->database->rollBackTransaction();
                        throw new DatabaseException('Could not execute prepared statement: '.$e->getMessage(), $this->database, $this);
                }
        }