aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/sqlite3.go b/sqlite3.go
index df3258a..4e94256 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -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
}