/** * Restore old innodbstats variable * @return void */ protected function restoreInnoDbStats() { $value = $this->mysql_innodbstats_value; if ($value !== null) { // restoring old variable $this->adapter->query("set global innodb_stats_on_metadata='{$value}'"); } }
/** * Execute information schema query * * @param string|null $table table name or null * @return ArrayObject * @throws Exception\ErrorException */ protected function executeQuery($table = null) { $query = $this->getQuery($table); $this->disableInnoDbStats(); try { $results = $this->adapter->query($query); } catch (\Exception $e) { $this->restoreInnoDbStats(); throw new Exception\ErrorException(__METHOD__ . ": " . $e->getMessage()); } $this->restoreInnoDbStats(); return $results; }
/** * Return current schema signature for caching * * @return void */ protected function setSchemaSignature() { $host = $this->adapter->getConnection()->getHost(); $schema = $this->schema; $this->schemaSignature = "{$host}:{$schema}"; }