Commit 9ea0a5e0 authored by gwenn's avatar gwenn

Trying to track a regression.

parent 1ce3334a
language: go
go:
- 1.2
- 1.3
- tip
before_install:
- echo "yes" | sudo add-apt-repository ppa:travis-ci/sqlite3
......
......@@ -100,7 +100,7 @@ func (c *Conn) prepare(sql string, args ...interface{}) (*Stmt, error) {
// If the caller knows that the supplied string is nul-terminated, then there is a small performance advantage to be gained by passing an nByte parameter that is equal to the number of bytes in the input string including the nul-terminator bytes as this saves SQLite from having to make a copy of the input string.
rv := C.sqlite3_prepare_v2(c.db, sqlstr, C.int(len(sql)+1), &stmt, &tail)
if rv != C.SQLITE_OK {
C.sqlite3_finalize(stmt)
// C.sqlite3_finalize(stmt) // If there is an error, *stmt is set to NULL
return nil, c.error(rv, sql)
}
var t string
......
......@@ -81,7 +81,9 @@ func TestTrace(t *testing.T) {
checkNoError(t, err, "couldn't set an authorizer: %s")
db.Profile(profile, t)
db.ProgressHandler(progressHandler, 1, t)
db.Exists("SELECT 1 WHERE 1 = ?", 1)
b, err := db.Exists("SELECT 1 WHERE 1 = ?", 1)
checkNoError(t, err, "error while executing stmt: %s")
assert.T(t, b, "exists")
}
func TestProfile(t *testing.T) {
......
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