Skip to content

Commit

Permalink
skip histogram views in active_reports table
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Mar 22, 2016
1 parent e0e556b commit 40178e8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ha_pinba.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ int ha_pinba::open(const char *name, int mode, uint test_if_locked) /* {{{ */
report_tables->std = NULL;
report_tables->tables = pinba_map_create();
D->reports_to_tables = pinba_map_add(D->reports_to_tables, share->index, report_tables);
report_tables->tables = pinba_map_add(report_tables->tables, name, (void *)1);
report_tables->tables = pinba_map_add(report_tables->tables, name, (void *)share->table_type);
} else {
void *dummy;

Expand All @@ -2017,7 +2017,7 @@ int ha_pinba::open(const char *name, int mode, uint test_if_locked) /* {{{ */

dummy = pinba_map_get(report_tables->tables, name);
if (!dummy) {
report_tables->tables = pinba_map_add(report_tables->tables, name, (void *)1);
report_tables->tables = pinba_map_add(report_tables->tables, name, (void *)share->table_type);
}
}
index_copy = strdup(share->index);
Expand Down Expand Up @@ -5732,6 +5732,7 @@ inline int ha_pinba::active_reports_fetch_row(unsigned char *buf) /* {{{ */
char *tmp, flags_str[256] = {0};
pinba_report_tables *tables;
void *dummy;
size_t table_type;
pinba_std_report *std;

DBUG_ENTER("ha_pinba::active_reports_fetch_row");
Expand Down Expand Up @@ -5792,6 +5793,13 @@ inline int ha_pinba::active_reports_fetch_row(unsigned char *buf) /* {{{ */
}
}

table_type = (size_t)dummy;
if (table_type == PINBA_TABLE_HISTOGRAM_VIEW) {
/* do not display histograms */
tables = (pinba_report_tables *)pinba_map_next(D->reports_to_tables, index);
goto repeat_with_next_report;
}

std = tables->std;

this_index[0].str.val = strdup(index);
Expand Down

0 comments on commit 40178e8

Please sign in to comment.