• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mattn / go-sqlite3 / 127 / 4
54%
master: 54%

Build:
DEFAULT BRANCH: master
Ran 24 Jul 2018 01:49PM UTC
Files 10
Run time 1s
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

19 Jul 2018 09:16AM UTC coverage: 58.275%. Remained the same
GOTAGS=sqlite_vacuum_full

push

travis-ci

GJRTimmer
<a href="https://github.com/mattn/go-sqlite3/commit/<a class=hub.com/mattn/go-sqlite3/commit/b3511bfdd742af558b54eb6160aca9446d762a19">b3511bfdd<a href="https://github.com/mattn/go-sqlite3/commit/b3511bfdd742af558b54eb6160aca9446d762a19">&quot;&gt;Ensure that SqliteStmt.closed property is guarded.

Because the closed property of the SQLiteRows&amp;#39;s *SqliteStmt
was not guarded, it was causing an issue during context
cancellation.

https://github.com/segmentio/go-sqlite3/blob/&lt;/a&gt;&lt;a class=&quot;double-link&quot; href=&quot;https://github.com/mattn/go-sqlite3/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/mattn/go-sqlite3/commit/<a class=hub.com/mattn/go-sqlite3/commit/be424d27acde822f080bdcd8a7ae6abd4d7d801e">be424d27a">be424d27a</a><a href="https://github.com/mattn/go-sqlite3/commit/b3511bfdd742af558b54eb6160aca9446d762a19">/sqlite3.go#L1785-L1796

When a statement is performing a query(), if it determines that
the context has been canceled, it will launch a goroutine that
closes the resulting driver.Rows if it&#39;s not already completed.

If the driver.Rows is not done (and the context has been canceled),
it will interrupt the connection and more importantly, perform
a rows.Close(). The method rows.Close() guards the closed bool with
a sync.Mutex to set it to true.

If a reader is reading from the SqliteRow, it will call Next()
and that performs this check:

https://github.com/segmentio/go-sqlite3/blob/be424d27acde822f080bdcd8a7ae6abd4d7d801e/sqlite3.go#L1915-L1917

Because this is not guarded, a data race ensues, and this was
actually caught by the Go race detector recently.

I didn&#39;t include a test case here because the fix seemed
straightforward enough and because race conditions are hard
to test for.  It&#39;s been verified in another program that this
fixes the issue.  If tests should be provided I&#39;m more than
happy to do so.</a>

919 of 1577 relevant lines covered (58.28%)

72829.62 hits per line

Source Files on job 127.4 (GOTAGS=sqlite_vacuum_full)
  • Tree
  • List 0
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 878
  • Travis Job 127.4
  • b3511bfd on github
  • Prev Job for GOTAGS=sqlite_vacuum_full on master (#810.4)
  • Next Job for GOTAGS=sqlite_vacuum_full on master (#128.4)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc