Fix labels name-only matching (#17482)
Stelios Fragkakis committed
Apr 23, 2024 at 15:27 UTC
9edea61e500f2af134f8d72d79d31826d9c918e8
1 file changed
+4
-1
src/database/rrdlabels.c
+4
-1
@@ -1144,7 +1144,10 @@ static SIMPLE_PATTERN_RESULT simple_pattern_match_name_only_callback(const char
1144
1145
// we return -1 to stop the walkthrough on first match
1146
t->searches++;
1147
- return simple_pattern_matches_extract(t->pattern, name, NULL, 0);
1147
+ SIMPLE_PATTERN_RESULT ret = simple_pattern_matches_extract(t->pattern, name, NULL, 0);
1148
+ if (ret == SP_MATCHED_NEGATIVE)
1149
+ ret = SP_NOT_MATCHED;
1150
+ return ret;
1151
}
1152
1153
static SIMPLE_PATTERN_RESULT simple_pattern_match_name_and_value_callback(const char *name, const char *value, RRDLABEL_SRC ls __maybe_unused, void *data) {