예제 #1
0
 private function lockLogTables()
 {
     Db::lockTables($readLocks = Common::prefixTables('log_conversion', 'log_link_visit_action', 'log_visit', 'log_conversion_item'), $writeLocks = Common::prefixTables('log_action'));
 }
예제 #2
0
파일: Db.php 프로젝트: hongquan/piwik
 /**
  * Checks whether the database user is allowed to lock tables.
  *
  * @return bool
  */
 public static function isLockPrivilegeGranted()
 {
     if (is_null(self::$lockPrivilegeGranted)) {
         try {
             Db::lockTables(Common::prefixTable('log_visit'));
             Db::unlockAllTables();
             self::$lockPrivilegeGranted = true;
         } catch (Exception $ex) {
             self::$lockPrivilegeGranted = false;
         }
     }
     return self::$lockPrivilegeGranted;
 }