Commit bf5a74e4842 for mysql.org

commit bf5a74e48423ac51200987edcd72a678772cb2ee
Author: Ridha Chahed <ridha.chahed@oracle.com>
Date:   Tue Nov 3 16:26:35 2026 +0100

    Bug#40248826 router.passthrough_db_user fails with four I/O threads

    Problem
    -------

    router.passthrough_db_user expects HTTP 429 when its four-connection
    passthrough pool is exhausted, but returns HTTP 500 on four-CPU CI
    runners.

    Analysis / Root-cause analysis
    ------------------------------

    Router defaults its I/O thread count to the available CPU count. The
    test holds a table lock while four REST queries occupy the passthrough
    pool and block four I/O workers. With only four workers, excess requests
    cannot run until blocked queries time out. Reconnection then loses the
    enabled role and queries fail with SELECT command denied instead of
    reporting pool exhaustion.

    Solution
    --------

    Add a test-specific Router configuration with 16 I/O threads so excess
    requests can run while the four DB queries remain blocked. Preserve the
    HTTP 429 assertion and all test semantics. This change affects only this
    test; reconnect role restoration is a separate issue.

    Validation: Explicit threads=4 reproduces the line-393 HTTP 500 failure.
    With the new configuration, three consecutive runs pass with the test
    process restricted to four CPUs.

    Change-Id: Ib61f244d46cf40ab0e0f4a191b3fa9872c635000

diff --git a/mysql-test/suite/router/t/passthrough_db_user-router.cnf b/mysql-test/suite/router/t/passthrough_db_user-router.cnf
new file mode 100644
index 00000000000..2e1e692212e
--- /dev/null
+++ b/mysql-test/suite/router/t/passthrough_db_user-router.cnf
@@ -0,0 +1,23 @@
+[DEFAULT]
+
+[logger]
+level=DEBUG
+
+[routing:static]
+bind_address=0.0.0.0
+routing_strategy=round-robin
+protocol=classic
+client_ssl_mode=PREFERRED
+server_ssl_mode=PREFERRED
+server_ssl_verify=DISABLED
+
+[http_server]
+
+[mysql_rest_service]
+mysql_read_write_route=static
+wait_for_metadata_schema_access=320
+
+# Keep the pool-exhaustion requests runnable while four DB queries block.
+# The default I/O thread count follows CPU count and can be only four in CI.
+[io]
+threads=16