diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 66cff25f..a39cff53 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,15 +27,15 @@ jobs: uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Initialize CodeQL - uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3 with: languages: ${{ matrix.language }} queries: +security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/autobuild@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3 with: category: "/language:${{ matrix.language }}" diff --git a/driver_test.go b/driver_test.go index f2aaf35b..761236f5 100644 --- a/driver_test.go +++ b/driver_test.go @@ -1947,6 +1947,13 @@ func TestConcurrent(t *testing.T) { // t.Skip(`TODO: "fix commands out of sync. Did you run multiple statements at once?" on MariaDB`) // } + // Release idle connections after this subtest so subsequent subtests can + // use the server's full connection budget. Without this, the default pool + // retains a few idle connections that eat into max_connections, causing + // Windows to return a TCP timeout instead of MySQL error 1040 when the + // next subtest tries to open connections. + defer dbt.db.SetMaxIdleConns(0) + var max int err := dbt.db.QueryRow("SELECT @@max_connections").Scan(&max) if err != nil {