Skip to content

Commit 7204887

Browse files
committed
Merge pull request #302 from shaxbee/master
Build with libsqlite3 on Ubuntu 14.04 LTS
2 parents 467f50b + 42d4117 commit 7204887

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
language: go
2+
sudo: required
3+
dist: trusty
24
go:
5+
- 1.5
6+
- 1.6
37
- tip
48
before_install:
59
- go get github.com/mattn/goveralls
610
- go get golang.org/x/tools/cmd/cover
711
script:
8-
- $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx
12+
- $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx
13+
- go test -v . -tags "libsqlite3"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ FAQ
3838
* Want to build go-sqlite3 with libsqlite3 on OS X.
3939

4040
Install sqlite3 from homebrew: `brew install sqlite3`
41+
4142
Use `go build --tags "libsqlite3 darwin"`
4243

4344
* Want to build go-sqlite3 with icu extension.

sqlite3.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ package sqlite3
2929
# define SQLITE_OPEN_FULLMUTEX 0
3030
#endif
3131
32+
#ifndef SQLITE_DETERMINISTIC
33+
# define SQLITE_DETERMINISTIC 0
34+
#endif
35+
3236
static int
3337
_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) {
3438
#ifdef SQLITE_OPEN_URI

sqlite3_fts3_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ func TestFTS4(t *testing.T) {
9393

9494
_, err = db.Exec("DROP TABLE foo")
9595
_, err = db.Exec("CREATE VIRTUAL TABLE foo USING fts4(tokenize=unicode61, id INTEGER PRIMARY KEY, value TEXT)")
96-
if err != nil {
96+
switch {
97+
case err != nil && err.Error() == "unknown tokenizer: unicode61":
98+
t.Skip("FTS4 not supported")
99+
case err != nil:
97100
t.Fatal("Failed to create table:", err)
98101
}
99102

0 commit comments

Comments
 (0)