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" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . '
' . "\n" . ' ' . $GLOBALS['strBufferPoolUsage'] . "\n" . '
' . "\n" . ' ' . $GLOBALS['strTotalUC'] . "\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" . '  ' . $GLOBALS['strFreePages'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_free']) . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strDirtyPages'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_dirty']) . "\n" . '
' . "\n" . '  ' . $GLOBALS['strDataPages'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_data']) . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strPagesToBeFlushed'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_flushed']) . "\n" . '
' . "\n" . '  ' . $GLOBALS['strBusyPages'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_misc']) . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strLatchedPages'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_pages_latched']) . "\n" . '
' . "\n\n" . '
' . "\n\n" . '' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . '
' . "\n" . ' ' . $GLOBALS['strBufferPoolActivity'] . "\n" . '
' . "\n" . '  ' . $GLOBALS['strReadRequests'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_read_requests']) . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strWriteRequests'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_write_requests']) . "\n" . '
' . "\n" . '  ' . $GLOBALS['strBufferReadMisses'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_reads']) . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strBufferWriteWaits'] . ' ' . "\n" . ' ' . "\n" . ' ' . htmlspecialchars($status['Innodb_buffer_pool_wait_free']) . "\n" . '
' . "\n" . '  ' . $GLOBALS['strBufferReadMissesInPercent'] . ' ' . "\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" . '  ' . $GLOBALS['strBufferWriteWaitsInPercent'] . ' ' . "\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"; return $output; case 'status': $res = PMA_DBI_query('SHOW INNODB STATUS;'); $row = PMA_DBI_fetch_row($res); PMA_DBI_free_result($res); return '
' . "\n"
                      . htmlspecialchars($row[0]) . "\n"
                      . '
' . "\n"; default: return FALSE; } } } ?>