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

mattn / go-sqlite3 / 127
54%

Build:
DEFAULT BRANCH: master
Ran 24 Jul 2018 01:48PM UTC
Jobs 16
Files 10
Run time 17min
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

pending completion
127

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>

915 of 1573 relevant lines covered (58.17%)

1254386.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 127.1 (GOTAGS=) 24 Jul 2018 01:48PM UTC 0
58.28
Travis Job 127.1
2 127.2 (GOTAGS=libsqlite3) 24 Jul 2018 01:49PM UTC 0
58.28
Travis Job 127.2
3 127.3 (GOTAGS="sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable") 24 Jul 2018 01:49PM UTC 0
58.28
Travis Job 127.3
4 127.4 (GOTAGS=sqlite_vacuum_full) 24 Jul 2018 01:49PM UTC 0
58.28
Travis Job 127.4
5 127.5 (GOTAGS=) 24 Jul 2018 01:51PM UTC 0
58.28
Travis Job 127.5
6 127.6 (GOTAGS=libsqlite3) 24 Jul 2018 01:56PM UTC 0
58.28
Travis Job 127.6
7 127.7 (GOTAGS="sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable") 24 Jul 2018 01:57PM UTC 0
58.28
Travis Job 127.7
8 127.8 (GOTAGS=sqlite_vacuum_full) 24 Jul 2018 01:57PM UTC 0
58.28
Travis Job 127.8
9 127.9 (GOTAGS=) 24 Jul 2018 01:53PM UTC 0
57.84
Travis Job 127.9
10 127.10 (GOTAGS=libsqlite3) 24 Jul 2018 01:55PM UTC 0
57.84
Travis Job 127.10
11 127.11 (GOTAGS="sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable") 24 Jul 2018 01:58PM UTC 0
57.84
Travis Job 127.11
12 127.12 (GOTAGS=sqlite_vacuum_full) 24 Jul 2018 02:00PM UTC 0
57.84
Travis Job 127.12
13 127.13 (GOTAGS=) 24 Jul 2018 02:02PM UTC 0
57.84
Travis Job 127.13
14 127.14 (GOTAGS=libsqlite3) 24 Jul 2018 02:04PM UTC 0
57.84
Travis Job 127.14
15 127.15 (GOTAGS="sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable") 24 Jul 2018 02:05PM UTC 0
57.84
Travis Job 127.15
16 127.16 (GOTAGS=sqlite_vacuum_full) 24 Jul 2018 02:05PM UTC 0
57.84
Travis Job 127.16
Source Files on build 127
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #127
  • b3511bfd on github
  • Prev Build on master (#810)
  • Next Build on master (#128)
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