Commit 96a298b9 authored by gwenn's avatar gwenn

Try to fix Travis build.

parent f5bd5897
......@@ -9,7 +9,6 @@ before_install:
before_script:
- go get github.com/bmizerany/assert
- go get code.google.com/p/go.tools/cmd/cover
- go get github.com/sauerbraten/radix
- go get -tags all github.com/gwenn/gosqlite
script:
- go test -tags all -cover ./...
\ No newline at end of file
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package shell_test
import (
......
......@@ -529,19 +529,23 @@ func (c *Conn) Close() error {
c.stmtCache.flush()
// Dangling statements
stmt := C.sqlite3_next_stmt(c.db, nil)
for stmt != nil {
if C.sqlite3_stmt_busy(stmt) != 0 {
Log(C.SQLITE_MISUSE, "Dangling statement (not reset): \""+C.GoString(C.sqlite3_sql(stmt))+"\"")
} else {
Log(C.SQLITE_MISUSE, "Dangling statement (not finalize): \""+C.GoString(C.sqlite3_sql(stmt))+"\"")
rv := C.sqlite3_close(c.db)
if rv == C.SQLITE_BUSY {
// Dangling statements
stmt := C.sqlite3_next_stmt(c.db, nil)
for stmt != nil {
if C.sqlite3_stmt_busy(stmt) != 0 {
Log(C.SQLITE_MISUSE, "Dangling statement (not reset): \""+C.GoString(C.sqlite3_sql(stmt))+"\"")
} else {
Log(C.SQLITE_MISUSE, "Dangling statement (not finalize): \""+C.GoString(C.sqlite3_sql(stmt))+"\"")
}
C.sqlite3_finalize(stmt)
stmt = C.sqlite3_next_stmt(c.db, nil)
}
//C.sqlite3_finalize(stmt)
stmt = C.sqlite3_next_stmt(c.db, stmt)
rv = C.sqlite3_close(c.db)
}
rv := C.sqlite3_close(c.db)
if rv != C.SQLITE_OK {
Log(int32(rv), "error while closing Conn")
return c.error(rv, "Conn.Close")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment