diff options
author | mattn <mattn.jp@gmail.com> | 2018-11-22 01:49:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-22 01:49:42 +0900 |
commit | 6a9185d7b1f12363e2c904449d374b63b6093b16 (patch) | |
tree | 411638e2fae68cd716fd12868bb8692dc502a84b /sqlite3.go | |
parent | Merge pull request #643 from akalin/zero-length-blob (diff) | |
parent | Fix data race in AutoCommit() (diff) | |
download | golite-6a9185d7b1f12363e2c904449d374b63b6093b16.tar.gz golite-6a9185d7b1f12363e2c904449d374b63b6093b16.tar.xz |
Merge pull request #626 from otoolep/fix_data_race
Fix data race in AutoCommit()
Diffstat (limited to 'sqlite3.go')
-rw-r--r-- | sqlite3.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -740,6 +740,8 @@ func (c *SQLiteConn) RegisterAggregator(name string, impl interface{}, pure bool // AutoCommit return which currently auto commit or not. func (c *SQLiteConn) AutoCommit() bool { + c.mu.Lock() + defer c.mu.Unlock() return int(C.sqlite3_get_autocommit(c.db)) != 0 } |