From 0477a5b35520f1f35c2d67b3766734cd454ed10c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 22:46:28 +0000 Subject: [PATCH] test: fix wildcard prefix setup Co-authored-by: renecannao <3645227+renecannao@users.noreply.github.com> Agent-Logs-Url: https://github.com/sysown/proxysql/sessions/15475838-0841-46d6-9afd-ebdc5847a3ae --- test/tap/tests/test_rule_matches_query-t.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tap/tests/test_rule_matches_query-t.cpp b/test/tap/tests/test_rule_matches_query-t.cpp index e433d6b0f..313e4662e 100644 --- a/test/tap/tests/test_rule_matches_query-t.cpp +++ b/test/tap/tests/test_rule_matches_query-t.cpp @@ -41,7 +41,7 @@ int main() { QP_rule_t client_addr_rule = make_rule(); client_addr_rule.client_addr = const_cast("192.168.%"); - client_addr_rule.client_addr_wildcard_position = std::strlen(client_addr_rule.client_addr) - 1; + client_addr_rule.client_addr_wildcard_position = std::strchr(client_addr_rule.client_addr, '%') - client_addr_rule.client_addr; ok( rule_matches_query(&client_addr_rule, 0, "appuser", "db1", "192.168.55.19", "127.0.0.1", 6033, 0, NULL, "SELECT 1", NULL, 2), "client_addr wildcard matches"