Skip to content

Commit a60479c

Browse files
committed
Bug#31084706 AVG_COUNT_RESET FOR MONITOR SET OWNER IS ALWAYS NULL IN
I_S.INNODB_METRICS Issue: While setting the monitor value METRIC_AVG_VALUE_RESET, the field is to be marked as notnull which was missed. Fix: Set the monitor filed to be notnull once we have set its value. Patch is contributed by Fungo Wang. RB : 24280 Reviewed by : Sunny Bains <[email protected]>
1 parent b58e94e commit a60479c

File tree

1 file changed

+2
-1
lines changed
  • storage/innobase/handler

1 file changed

+2
-1
lines changed

storage/innobase/handler/i_s.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1905,7 +1905,7 @@ static int i_s_metrics_fill(
19051905
time_diff = 0;
19061906
}
19071907

1908-
/* Unless MONITOR__NO_AVERAGE is marked, we will need
1908+
/* Unless MONITOR_NO_AVERAGE is marked, we will need
19091909
to calculate the average value. If this is a monitor set
19101910
owner marked by MONITOR_SET_OWNER, divide
19111911
the value by another counter (number of calls) designated
@@ -1933,6 +1933,7 @@ static int i_s_metrics_fill(
19331933
MONITOR_VALUE(count) /
19341934
MONITOR_VALUE(monitor_info->monitor_related_id),
19351935
FALSE));
1936+
fields[METRIC_AVG_VALUE_RESET]->set_notnull();
19361937
} else {
19371938
fields[METRIC_AVG_VALUE_RESET]->set_null();
19381939
}

0 commit comments

Comments
 (0)