From: Nick Porter Date: Thu, 21 Aug 2025 10:56:50 +0000 (+0100) Subject: If no rows are affected output zero X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=980bb74b8ee6eed7292a18263c66adcc9fa52154;p=thirdparty%2Ffreeradius-server.git If no rows are affected output zero Rather than no boxes, which just results in warnings when assigning the xlat output to an attribute --- diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index ed738256860..20bd3fed677 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -468,7 +468,7 @@ static xlat_action_t sql_xlat_query_resume(TALLOC_CTX *ctx, fr_dcursor_t *out, x numaffected = (inst->driver->sql_affected_rows)(query_ctx, &inst->config); if (numaffected < 1) { RDEBUG2("SQL query affected no rows"); - goto finish; + numaffected = 0; } MEM(vb = fr_value_box_alloc_null(ctx));