Skip to content

Commit a003fc3

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 d99dcce commit a003fc3

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
@@ -2618,7 +2618,7 @@ i_s_metrics_fill(
26182618
time_diff = 0;
26192619
}
26202620

2621-
/* Unless MONITOR__NO_AVERAGE is marked, we will need
2621+
/* Unless MONITOR_NO_AVERAGE is marked, we will need
26222622
to calculate the average value. If this is a monitor set
26232623
owner marked by MONITOR_SET_OWNER, divide
26242624
the value by another counter (number of calls) designated
@@ -2649,6 +2649,7 @@ i_s_metrics_fill(
26492649
/ MONITOR_VALUE(
26502650
monitor_info->monitor_related_id),
26512651
FALSE));
2652+
fields[METRIC_AVG_VALUE_RESET]->set_notnull();
26522653
} else {
26532654
fields[METRIC_AVG_VALUE_RESET]->set_null();
26542655
}

0 commit comments

Comments
 (0)