From 3ebb821e65f8282d323b702d7abfbdfd5169b37f Mon Sep 17 00:00:00 2001 From: Zbigniew Mandziejewicz Date: Fri, 22 Apr 2016 16:20:04 +0800 Subject: [PATCH 1/4] Set SQLITE_DETERMINISTIC if undefined --- sqlite3.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sqlite3.go b/sqlite3.go index 4d81917..852c299 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -29,6 +29,10 @@ package sqlite3 # define SQLITE_OPEN_FULLMUTEX 0 #endif +#ifndef SQLITE_DETERMINISTIC +# define SQLITE_DETERMINISTIC 0 +#endif + static int _sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) { #ifdef SQLITE_OPEN_URI From c8316feaa323fa1db4ce79fea9944ca12b36a1f5 Mon Sep 17 00:00:00 2001 From: Zbigniew Mandziejewicz Date: Fri, 22 Apr 2016 20:45:49 +0800 Subject: [PATCH 2/4] Test with libsqlite3 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 03d626f..ec78ada 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,11 @@ language: go go: + - 1.5 + - 1.6 - tip before_install: - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover script: - - $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx + - $HOME/gopath/bin/goveralls + - go test -v . -tags "libsqlite3" From 9f06636f8cbb5cdd7aebcc8b4897644f56856d9b Mon Sep 17 00:00:00 2001 From: Zbigniew Mandziejewicz Date: Fri, 22 Apr 2016 21:13:07 +0800 Subject: [PATCH 3/4] FTS4 is not available on Trusty --- README.md | 1 + sqlite3_fts3_test.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1092c9b..c2e0d5a 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ FAQ * Want to build go-sqlite3 with libsqlite3 on OS X. Install sqlite3 from homebrew: `brew install sqlite3` + Use `go build --tags "libsqlite3 darwin"` * Want to build go-sqlite3 with icu extension. diff --git a/sqlite3_fts3_test.go b/sqlite3_fts3_test.go index 803afbd..e06fc5d 100644 --- a/sqlite3_fts3_test.go +++ b/sqlite3_fts3_test.go @@ -93,7 +93,10 @@ func TestFTS4(t *testing.T) { _, err = db.Exec("DROP TABLE foo") _, err = db.Exec("CREATE VIRTUAL TABLE foo USING fts4(tokenize=unicode61, id INTEGER PRIMARY KEY, value TEXT)") - if err != nil { + switch { + case err != nil && err.Error() == "unknown tokenizer: unicode61": + t.Skip("FTS4 not supported") + case err != nil: t.Fatal("Failed to create table:", err) } From 42d411769d50f90bf095e846af7a32f40afbf234 Mon Sep 17 00:00:00 2001 From: Zbigniew Mandziejewicz Date: Fri, 22 Apr 2016 23:36:29 +0800 Subject: [PATCH 4/4] Bump Travis to Ubuntu 14.04 --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ec78ada..e85e473 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: go +sudo: required +dist: trusty go: - 1.5 - 1.6 @@ -7,5 +9,5 @@ before_install: - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover script: - - $HOME/gopath/bin/goveralls + - $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx - go test -v . -tags "libsqlite3"