Merge pull request #88 from hattya/close_v2

Use sqlite3_close_v2()
This commit is contained in:
mattn 2013-10-24 17:02:49 -07:00
commit 056b49918a
1 changed files with 1 additions and 6 deletions

View File

@ -293,12 +293,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
// Close the connection.
func (c *SQLiteConn) Close() error {
s := C.sqlite3_next_stmt(c.db, nil)
for s != nil {
C.sqlite3_finalize(s)
s = C.sqlite3_next_stmt(c.db, nil)
}
rv := C.sqlite3_close(c.db)
rv := C.sqlite3_close_v2(c.db)
if rv != C.SQLITE_OK {
return ErrNo(rv)
}