summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-22 07:02:09 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-22 07:02:09 +0000
commit092726df1603daefb347c66e50e270fc1e6581cc (patch)
tree0f2d5d089e8033413d9b802535a50ba73d522d24
parent86289baab32ce3b7be7de3cf274589ac45234b47 (diff)
downloadbrdo-092726df1603daefb347c66e50e270fc1e6581cc.tar.gz
brdo-092726df1603daefb347c66e50e270fc1e6581cc.tar.bz2
- Patch #212233 by lilou, catch: remove SQL report.
-rw-r--r--modules/system/system.admin.inc64
-rw-r--r--modules/system/system.module6
2 files changed, 0 insertions, 70 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index a9f040f96..3fffeab84 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1809,70 +1809,6 @@ function system_php() {
}
/**
- * Theme a SQL result table.
- *
- * @param $data
- * The actual table data.
- * @param $keys
- * Data keys and descriptions.
- * @return
- * The output HTML.
- */
-function _system_sql($data, $keys) {
- $rows = array();
- foreach ($keys as $key => $explanation) {
- if (isset($data[$key])) {
- $rows[] = array(check_plain($key), check_plain($data[$key]), $explanation);
- }
- }
-
- return theme('table', array(t('Variable'), t('Value'), t('Description')), $rows);
-}
-
-/**
- * Menu callback: return information about the database.
- */
-function system_sql() {
-
- $result = db_query("SHOW STATUS");
- foreach ($result as $entry) {
- // 'SHOW STATUS' returns fields named 'Variable_name' and 'Value',
- // case is important.
- $data[$entry->Variable_name] = $entry->Value;
- }
-
- $output = '<h2>' . t('Command counters') . '</h2>';
- $output .= _system_sql($data, array(
- 'Com_select' => t('The number of !sql statements.', array('!sql' => '<code>SELECT</code>')),
- 'Com_insert' => t('The number of !sql statements.', array('!sql' => '<code>INSERT</code>')),
- 'Com_update' => t('The number of !sql statements.', array('!sql' => '<code>UPDATE</code>')),
- 'Com_delete' => t('The number of !sql statements.', array('!sql' => '<code>DELETE</code>')),
- 'Com_lock_tables' => t('The number of table locks.'),
- 'Com_unlock_tables' => t('The number of table unlocks.')
- ));
-
- $output .= '<h2>' . t('Query performance') . '</h2>';
- $output .= _system_sql($data, array(
- 'Select_full_join' => t('The number of joins without an index; should be zero.'),
- 'Select_range_check' => t('The number of joins without keys that check for key usage after each row; should be zero.'),
- 'Sort_scan' => t('The number of sorts done without using an index; should be zero.'),
- 'Table_locks_immediate' => t('The number of times a lock could be acquired immediately.'),
- 'Table_locks_waited' => t('The number of times the server had to wait for a lock.')
- ));
-
- $output .= '<h2>' . t('Query cache information') . '</h2>';
- $output .= '<p>' . t('The MySQL query cache can improve performance of your site by storing the result of queries. Then, if an identical query is received later, the MySQL server retrieves the result from the query cache rather than parsing and executing the statement again.') . '</p>';
- $output .= _system_sql($data, array(
- 'Qcache_queries_in_cache' => t('The number of queries in the query cache.'),
- 'Qcache_hits' => t('The number of times MySQL found previous results in the cache.'),
- 'Qcache_inserts' => t('The number of times MySQL added a query to the cache (misses).'),
- 'Qcache_lowmem_prunes' => t('The number of times MySQL had to remove queries from the cache because it ran out of memory. Ideally should be zero.')
- ));
-
- return $output;
-}
-
-/**
* Default page callback for batches.
*/
function system_batch_page() {
diff --git a/modules/system/system.module b/modules/system/system.module
index 40538d104..8f4a98625 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -749,12 +749,6 @@ function system_menu() {
'access arguments' => array('administer site configuration'),
'type' => MENU_CALLBACK,
);
- $items['admin/reports/status/sql'] = array(
- 'title' => 'SQL',
- 'page callback' => 'system_sql',
- 'access arguments' => array('administer site configuration'),
- 'type' => MENU_CALLBACK,
- );
// Default page for batch operations
$items['batch'] = array(
'page callback' => 'system_batch_page',