PostgreSQL: Improve SQL error handling
[lhc/web/wiklou.git] / includes / db / DatabaseSqlite.php
index 0556810..3aa21b8 100644 (file)
@@ -115,16 +115,11 @@ class DatabaseSqlite extends DatabaseBase {
        }
 
        /**
-        * Close an SQLite database
-        *
+        * Does not actually close the connection, just destroys the reference for GC to do its work
         * @return bool
         */
-       function close() {
-               $this->mOpened = false;
-               if ( is_object( $this->mConn ) ) {
-                       if ( $this->trxLevel() ) $this->commit();
-                       $this->mConn = null;
-               }
+       protected function closeConnection() {
+               $this->mConn = null;
                return true;
        }
 
@@ -636,7 +631,7 @@ class DatabaseSqlite extends DatabaseBase {
 
        function begin( $fname = '' ) {
                if ( $this->mTrxLevel == 1 ) {
-                       $this->commit();
+                       $this->commit( __METHOD__ );
                }
                $this->mConn->beginTransaction();
                $this->mTrxLevel = 1;