• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Warning: This build has drifted.
The coverage report for this pull request build may be inaccurate because its base commit is no longer the HEAD of its target branch.
This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

    • Learn more: For more information on this, see Tracking coverage changes for pull request builds.
    • Fix now: For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
    • Prevent going forward: To avoid this issue with future PRs, see these Recommended CI Configurations.
New Repo Setting:
INCLUDE COVERAGE % WITH WARNINGS ABOUT DRIFTED BUILDS?

Enabling this setting will include a (potentially inaccurate) coverage % with warning messages in status updates for drifted builds.

Adjust setting

block / mysql / 34064857257
85%
master: 85%

Build:
Build:
LAST BUILD BRANCH: feat/always-reject-read-only
DEFAULT BRANCH: master
Ran 06 Sep 2026 10:45PM UTC
Jobs 5
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Sep 2026 10:43PM UTC coverage: 84.767% (+0.2%) from 84.528%
34064857257

Pull #5

github

morgo
readonly: test the exemption lifecycle, log the discarded error

Three fixes from review.

The exemption flag had no test driving it. TestReadOnlyTxIsExempt proved
handleErrorPacket reads it, but set the field itself, so three mutations
survived the full suite: begin setting it unconditionally, and either of
Commit or Rollback failing to clear it. The first is the worst — every
transaction exempt means any connection that has ever run a BeginTx stops
rejecting read-only errors for the rest of its life in the pool, the feature
silently off. TestReadOnlyTxLifecycle drives begin/Commit/Rollback against a
mock server and kills all three.

ResetSession now clears the flag too. Every sql.Tx ends in Commit or Rollback
so this should be unreachable, but the stuck direction is the unsafe one and
a pooled connection's assumptions belong there.

The server's error was discarded with nothing logged. For the failover this
is written for that is fine — database/sql retries and the caller sees
nothing. For a target that stays read-only it is not: the retry budget burns,
the caller gets a bare driver.ErrBadConn, and the one string that named the
problem was assembled nowhere. Log it before closing.

README: name the 1290s that are not failover (secure_file_priv,
super_read_only, innodb_read_only, --skip-grant-tables), and say plainly what
a deliberately read-only deployment should do now that the option is gone.
Pull Request #5: Always reject read-only connections

45 of 45 new or added lines in 4 files covered. (100.0%)

1 existing line in 1 file now uncovered.

3617 of 4267 relevant lines covered (84.77%)

328355.4 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
85.92
0.38% dsn.go
Jobs
ID Job ID Ran Files Coverage
1 Linux-Go-1.27-DB-8.4 - 34064857257.1 06 Sep 2026 10:45PM UTC 21
81.77
GitHub Action Run
2 Linux-Go-1.27-DB-9.7 - 34064857257.2 06 Sep 2026 10:46PM UTC 21
81.77
GitHub Action Run
3 Linux-Go-1.27-DB-8.0 - 34064857257.3 06 Sep 2026 10:45PM UTC 21
81.88
GitHub Action Run
4 Linux-Go-1.26-DB-9.7 - 34064857257.4 06 Sep 2026 10:45PM UTC 21
83.12
GitHub Action Run
5 Linux-Go-1.25-DB-9.7 - 34064857257.5 06 Sep 2026 10:46PM UTC 21
83.08
GitHub Action Run
Source Files on build 34064857257
  • Tree
  • List 21
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #5
  • PR Base - master (#34064809572)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc