示例#1
0
文件: Mysql.php 项目: kandy/system
 /**
  * Rollback transaction
  * @return bool
  */
 protected function _rollBack()
 {
     if ($this->_nestedTransactionsCounter <= 0) {
         throw new Zend_Db_Adapter_Exception('Nested transactions error');
     }
     if (!$this->_isInRollback) {
         $result = parent::_rollBack();
         $this->_isInRollback = true;
     } else {
         $result = true;
     }
     $this->_nestedTransactionsCounter--;
     if ($this->_nestedTransactionsCounter == 0) {
         $this->_isInRollback = false;
     }
     return $result;
 }