コード例 #1
0
ファイル: Mysql.php プロジェクト: kandy/system
 /**
  * Begin transaction
  * @return bool
  */
 protected function _beginTransaction()
 {
     if ($this->_isInRollback) {
         throw new Zend_Db_Adapter_Exception('Cannot begin transaction while in rollback mode');
     }
     $this->_nestedTransactionsCounter++;
     if ($this->_nestedTransactionsCounter == 1) {
         return parent::_beginTransaction();
     }
     return true;
 }
コード例 #2
0
ファイル: Mysqlutf8.php プロジェクト: alexukua/opus4
 /**
  * Override to implement transaction start counting.
  *
  * If a transaction is already running, no new one will be started.
  *
  * @return bool True
  */
 protected function _beginTransaction()
 {
     if ($this->_runningTransactions < 1) {
         $query = $this->getProfiler()->queryStart('real_BEGIN', Zend_Db_Profiler::TRANSACTION);
         parent::_beginTransaction();
         $this->getProfiler()->queryEnd($query);
     }
     $this->_runningTransactions++;
     return true;
 }