forked from mirror/go-sqlite3
Merge pull request #626 from otoolep/fix_data_race
Fix data race in AutoCommit()
This commit is contained in:
commit
6a9185d7b1
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue