array( 'title' => $GLOBALS['strInnoDBDataHomeDir'], 'desc' => $GLOBALS['strInnoDBDataHomeDirDesc'] ), 'innodb_data_file_path' => array( 'title' => $GLOBALS['strInnoDBDataFilePath'] ), 'innodb_autoextend_increment' => array( 'title' => $GLOBALS['strInnoDBAutoextendIncrement'], 'desc' => $GLOBALS['strInnoDBAutoextendIncrementDesc'], 'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC ), 'innodb_buffer_pool_size' => array( 'title' => $GLOBALS['strInnoDBBufferPoolSize'], 'desc' => $GLOBALS['strInnoDBBufferPoolSizeDesc'], 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE ) ); } function getVariablesLikePattern () { return 'innodb\\_%'; } function getInfoPages () { if ($this->support < PMA_ENGINE_SUPPORT_YES) { return array(); } $pages = array(); if (PMA_MYSQL_INT_VERSION >= 50002) { $pages['bufferpool'] = $GLOBALS['strBufferPool']; } $pages['status'] = $GLOBALS['strInnodbStat']; return $pages; } function getPage($id) { global $cfg; switch ($id) { case 'bufferpool': if (PMA_MYSQL_INT_VERSION < 50002) { return FALSE; } // rabus: The following query is only possible because we know // that we are on MySQL 5 here (checked above)! // side note: I love MySQL 5 for this. :-) $res = PMA_DBI_query('SHOW STATUS WHERE Variable_name LIKE \'Innodb\\_buffer\\_pool\\_%\' OR Variable_name = \'Innodb_page_size\';'); $status = array(); while ($row = PMA_DBI_fetch_row($res)) { $status[$row[0]] = $row[1]; } PMA_DBI_free_result($res); unset($res, $row); $output = '
' . "\n" . ' ' . $GLOBALS['strBufferPoolUsage'] . "\n" . ' | ' . "\n" . '|||
---|---|---|---|
' . "\n" . ' ' . $GLOBALS['strTotalUC'] . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_total']) . ' ' . $GLOBALS['strInnoDBPages'] . ' / ' . join(' ', PMA_formatByteDown($status['Innodb_buffer_pool_pages_total'] * $status['Innodb_page_size'])) . "\n" . ' | ' . "\n" . '||
' . "\n" . ' ' . $GLOBALS['strFreePages'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_free']) . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . $GLOBALS['strDirtyPages'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_dirty']) . "\n" . ' | ' . "\n" . '
' . "\n" . ' ' . $GLOBALS['strDataPages'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_data']) . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . $GLOBALS['strPagesToBeFlushed'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_flushed']) . "\n" . ' | ' . "\n" . '
' . "\n" . ' ' . $GLOBALS['strBusyPages'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_misc']) . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . $GLOBALS['strLatchedPages'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_latched']) . "\n" . ' | ' . "\n" . '
' . "\n" . ' ' . $GLOBALS['strBufferPoolActivity'] . "\n" . ' | ' . "\n" . '|||
---|---|---|---|
' . "\n" . ' ' . $GLOBALS['strReadRequests'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_read_requests']) . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . $GLOBALS['strWriteRequests'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_write_requests']) . "\n" . ' | ' . "\n" . '
' . "\n" . ' ' . $GLOBALS['strBufferReadMisses'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_reads']) . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . $GLOBALS['strBufferWriteWaits'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_wait_free']) . "\n" . ' | ' . "\n" . '
' . "\n" . ' ' . $GLOBALS['strBufferReadMissesInPercent'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . ($status['Innodb_buffer_pool_read_requests'] == 0 ? '---' : htmlspecialchars(number_format($status['Innodb_buffer_pool_reads'] * 100 / $status['Innodb_buffer_pool_read_requests'], 2, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator'])) . ' %') . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . $GLOBALS['strBufferWriteWaitsInPercent'] . ' ' . "\n" . ' | ' . "\n" . '' . "\n" . ' ' . ($status['Innodb_buffer_pool_write_requests'] == 0 ? '---' : htmlspecialchars(number_format($status['Innodb_buffer_pool_wait_free'] * 100 / $status['Innodb_buffer_pool_write_requests'], 2, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator'])) . ' %') . "\n" . ' | ' . "\n" . '
' . "\n" . htmlspecialchars($row[0]) . "\n" . '' . "\n"; default: return FALSE; } } } ?>