CVS update: /cowiki/includes/cowiki/class/dao/

[email protected] 7 May 2005 00:30:55 -0000
Newsgroups gmane.comp.php.cowiki.cvs
Message-ID <[email protected]>
User: dgorski 
Date: 2005/05/06 17:30:55

Modified:
   cowiki/includes/cowiki/class/dao/class.StorageMySQLi.php
   cowiki/includes/cowiki/class/dao/class.StorageMySQL.php

Log:
 Do not auto commit

File Changes:

Directory: /cowiki/includes/cowiki/class/dao/
=============================================

File [changed]: class.StorageMySQLi.php
Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/class/dao/class.StorageMySQLi.php?r1=1.15&r2=1.16
Delta lines:  +11 -2
--------------------
--- class.StorageMySQLi.php	6 May 2005 02:09:14 -0000	1.15
+++ class.StorageMySQLi.php	7 May 2005 00:30:53 -0000	1.16
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.StorageMySQLi.php,v 1.15 2005/05/06 02:09:14 dgorski Exp $
+ * $Id: class.StorageMySQLi.php,v 1.16 2005/05/07 00:30:53 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -17,7 +17,7 @@
  * @author      Daniel T. Gorski, <[email protected]>
  * @copyright   (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license     http://www.gnu.org/licenses/gpl.html
- * @version     $Revision: 1.15 $
+ * @version     $Revision: 1.16 $
  *
  */
 
@@ -88,6 +88,7 @@
      * @todo    [D11N]  Check description
      *
      * @throws  StorageConnectionFailureException
+     * @throws  StorageException
      */
     public function connect($sHost, $sPort, $sUser, $sPass) {
 
@@ -111,6 +112,14 @@
                 mysqli_connect_error()
             );
         }
+
+        // Do not auto commit
+        $sQuery = 'SET AUTOCOMMIT=0';
+
+        // {{{ DEBUG }}}
+        Logger::sql($sQuery);
+
+        $this->query($sQuery);
     }
 
     // --------------------------------------------------------------------

File [changed]: class.StorageMySQL.php
Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/class/dao/class.StorageMySQL.php?r1=1.33&r2=1.34
Delta lines:  +23 -11
---------------------
--- class.StorageMySQL.php	6 May 2005 02:09:14 -0000	1.33
+++ class.StorageMySQL.php	7 May 2005 00:30:53 -0000	1.34
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.StorageMySQL.php,v 1.33 2005/05/06 02:09:14 dgorski Exp $
+ * $Id: class.StorageMySQL.php,v 1.34 2005/05/07 00:30:53 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -17,7 +17,7 @@
  * @author      Daniel T. Gorski, <[email protected]>
  * @copyright   (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license     http://www.gnu.org/licenses/gpl.html
- * @version     $Revision: 1.33 $
+ * @version     $Revision: 1.34 $
  *
  */
 
@@ -53,6 +53,9 @@
         $sPass = null,
         $sDb   = null;
 
+    protected
+        $nTrans   = 0;
+
     // --------------------------------------------------------------------
 
     /**
@@ -98,6 +101,7 @@
      * @todo    [D11N]  Check description
      *
      * @throws  StorageConnectionFailureException
+     * @throws  StorageException
      */
     public function connect($sHost, $sPort, $sUser, $sPass) {
 
@@ -115,6 +119,14 @@
             Logger::error('MySQL error '.mysql_errno().': '.mysql_error());
             throw new StorageConnectionFailureException(mysql_error());
         }
+
+        // Do not auto commit
+        $sQuery = 'SET AUTOCOMMIT=0';
+
+        // {{{ DEBUG }}}
+        Logger::sql($sQuery);
+
+        $this->query($sQuery);
     }
 
     // --------------------------------------------------------------------