summaryrefslogtreecommitdiff
path: root/innobase/ha/ha0ha.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/ha/ha0ha.c')
-rw-r--r--innobase/ha/ha0ha.c40
1 files changed, 5 insertions, 35 deletions
diff --git a/innobase/ha/ha0ha.c b/innobase/ha/ha0ha.c
index 5e807406ce0..e8082f016b9 100644
--- a/innobase/ha/ha0ha.c
+++ b/innobase/ha/ha0ha.c
@@ -317,22 +317,13 @@ Prints info of a hash table. */
void
ha_print_info(
/*==========*/
- char* buf, /* in/out: buffer where to print */
- char* buf_end,/* in: buffer end */
+ FILE* file, /* in: file where to print */
hash_table_t* table) /* in: hash table */
{
hash_cell_t* cell;
-/* ha_node_t* node;
- ulint nodes = 0;
- ulint len = 0;
- ulint max_len = 0; */
ulint cells = 0;
ulint n_bufs;
ulint i;
-
- if (buf_end - buf < 200) {
- return;
- }
for (i = 0; i < hash_get_n_cells(table); i++) {
@@ -341,33 +332,12 @@ ha_print_info(
if (cell->node) {
cells++;
-/*
- len = 0;
-
- node = cell->node;
-
- for (;;) {
- len++;
- nodes++;
-
- if (ha_chain_get_next(table, node) == NULL) {
-
- break;
- }
-
- node = node->next;
- }
-
- if (len > max_len) {
- max_len = len;
- }
-*/
}
}
- buf += sprintf(buf,
-"Hash table size %lu, used cells %lu", (ulong) hash_get_n_cells(table),
- (ulong) cells);
+ fprintf(file,
+ "Hash table size %lu, used cells %lu",
+ (ulong) hash_get_n_cells(table), (ulong) cells);
if (table->heaps == NULL && table->heap != NULL) {
@@ -380,6 +350,6 @@ ha_print_info(
n_bufs++;
}
- buf += sprintf(buf, ", node heap has %lu buffer(s)\n", (ulong) n_bufs);
+ fprintf(file, ", node heap has %lu buffer(s)\n", (ulong) n_bufs);
}
}