Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6a9185d

Browse files
authored
Merge pull request mattn#626 from otoolep/fix_data_race
Fix data race in AutoCommit()
2 parents 873ec57 + abfacf5 commit 6a9185d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎sqlite3.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,8 @@ func (c *SQLiteConn) RegisterAggregator(name string, impl interface{}, pure bool
740740

741741
// AutoCommit return which currently auto commit or not.
742742
func (c *SQLiteConn) AutoCommit() bool {
743+
c.mu.Lock()
744+
defer c.mu.Unlock()
743745
return int(C.sqlite3_get_autocommit(c.db)) != 0
744746
}
745747

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /