Commit Graph

788 Commits

Author SHA1 Message Date
Yasuhiro Matsumoto f043f8092b use prepare instead of Prepare 2016-11-09 01:13:34 +09:00
Yasuhiro Matsumoto 599dd7631f disable combination of libsqlite3 and trace because travis(trusty) is too old. 2016-11-08 18:27:48 +09:00
Joachim Bauch 6e9298a6b1 fix .travis.yml 2016-11-08 17:55:41 +09:00
Yasuhiro Matsumoto aa33ddc53b fix build 2016-11-08 17:24:01 +09:00
Yasuhiro Matsumoto d1009b4fa6 fix build 2016-11-08 17:12:03 +09:00
Yasuhiro Matsumoto bfeda3f4f6 fix build 2016-11-08 17:07:52 +09:00
mattn 14e5ed1773 Merge pull request #353 from fancycode/travis_tags
Test different build configurations on Travis.
2016-11-08 16:47:13 +09:00
Joachim Bauch 2a8baa5914
Test different build configurations on Travis. 2016-11-08 08:40:35 +01:00
Yasuhiro Matsumoto ea2afbe9e8 revert Multiple Result Set 2016-11-08 13:22:46 +09:00
Yasuhiro Matsumoto dc448a0cb6 fix trace callback. 2016-11-08 12:27:31 +09:00
Yasuhiro Matsumoto dd2c82226b fix trace callback.
Close #352
2016-11-08 12:19:51 +09:00
mattn 3e26a9df84 Merge pull request #351 from andrefsp/data-race-fix
Fix data race introduced on 605d9d08
2016-11-08 01:07:26 +09:00
andrefsp 6c0a6bb9cd Fix data race introduced on 605d9d08
This commit will fix a data race introduced on 605d9d08 and also
make sure travis CI will now check for data races.
2016-11-07 11:57:52 +00:00
Yasuhiro Matsumoto 51f43971ab Merge branch 'master' of https://github.com/mattn/go-sqlite3 2016-11-07 16:16:47 +09:00
Yasuhiro Matsumoto 8d7068003b FAQ about concurrency. Close #350 2016-11-07 16:16:17 +09:00
Yasuhiro Matsumoto deed33aec7 cancel 2016-11-06 20:46:27 +09:00
Yasuhiro Matsumoto 605d9d0851 cancel 2016-11-06 20:43:53 +09:00
Yasuhiro Matsumoto 15491aeb9c go vet && golint 2016-11-06 13:16:38 +09:00
Yasuhiro Matsumoto cde7293c72 go vet && golint 2016-11-05 00:46:04 +09:00
Yasuhiro Matsumoto 0d1d1a644e go vet && golint 2016-11-05 00:40:06 +09:00
Yasuhiro Matsumoto a9ad8a09c9 remove trailing space 2016-11-05 00:28:43 +09:00
mattn f4e49e6484 Merge pull request #348 from mattn/ping
new go1.8 feature
2016-11-04 23:24:02 +09:00
Yasuhiro Matsumoto 57eaf4c070 separate test 2016-11-04 15:17:21 +09:00
Yasuhiro Matsumoto 755d5be32c add BeginContext 2016-11-04 15:15:16 +09:00
Yasuhiro Matsumoto 025b917610 add PrepareContext 2016-11-04 15:11:24 +09:00
Yasuhiro Matsumoto 29b191f206 build tag 2016-11-04 15:07:51 +09:00
Yasuhiro Matsumoto 4d2dc45165 Merge branch 'type' into ping 2016-11-04 15:05:42 +09:00
Yasuhiro Matsumoto b23526fb3c support named params 2016-11-04 15:00:29 +09:00
Yasuhiro Matsumoto c95a77965c context features 2016-11-04 14:24:22 +09:00
Yasuhiro Matsumoto d0e4959926 add go18 new feature 2016-11-04 00:03:16 +09:00
Yasuhiro Matsumoto 6796d46c3a implement go18 Pinger 2016-11-03 23:05:34 +09:00
Yasuhiro Matsumoto 86681de00a remove -Wno-c99-extension
Close #343
2016-10-28 23:22:18 +09:00
mattn dbe15b0408 Merge pull request #339 from brauner/2016-10-17/fix_libsqlite3_build
actually link to <sqlite3.h> when -tags libsqlite3
2016-10-28 17:48:50 +09:00
Christian Brauner 420dc664ed
upgrade: add ifdefines
This makes it possible to correctly link against the system sqlite. Also, don't
use defers with log.Fatal() since they won't be run on exit.

Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-10-28 10:28:19 +02:00
Christian Brauner f6e7921d24
actually link to <sqlite3.h> when -tags libsqlite3
Building with -tags libsqlite3 used the sqlite3.h from the system but the go
compiler will compile all *.{c,h} files in the same direcory:

	"When the Go tool sees that one or more Go files use the special import
	"C", it will look for other non-Go files in the directory and compile
	them as part of the Go package. Any .c, .s, or .S files will be compiled
	with the C compiler." (https://golang.org/cmd/cgo/)

So if users actually want to link against the system sqlite3 we should make
sqlite3-binding.* a noop.

Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
2016-10-28 10:28:17 +02:00
mattn 955dae4ebd Merge pull request #345 from joeshaw/backup-finalizer-fix
fix double free in SQLiteBackup.Close() on error
2016-10-28 08:55:17 +09:00
Joe Shaw bdab31cc98 fix double free in SQLiteBackup.Close() on error
The sqlite3_backup_finish() function never fails, it just returns the
error code from previous operations.  Previously if it returned an
error, the finalizer wouldn't be unset and sqlite3_backup_finish() would
be run again on an already-finished backup.  This results in a
double-free and often segfaults.

The error handling is described in more detail in the "Error handling"
section of https://www.sqlite.org/backup.html.
2016-10-27 16:44:56 -07:00
mattn e5a3c16c5c Merge pull request #333 from nyarly/master
Added CFLAG config to ignore deprecations
2016-10-05 01:01:36 +09:00
Judson 61c9552d18
Added CFLAG config to ignore deprecations 2016-10-04 16:51:54 +01:00
mattn 4b0af852c1 Merge pull request #331 from a-p-/test-backup-error
Test the error reporting when preparing to perform a backup.
2016-09-27 11:28:46 +09:00
a-p- 0e686cadf6 Test the error reporting when preparing to perform a backup. 2016-09-23 08:41:32 -04:00
Yasuhiro Matsumoto 3fb7a0e792 TestAggregatorRegistration may fail if trace feature is not implemented 2016-09-08 01:20:43 +09:00
Yasuhiro Matsumoto 0cc5236296 add tracecallback_noimpl.go 2016-09-08 01:13:15 +09:00
Yasuhiro Matsumoto e63ddcaa1a wrapper is not needress when not use libsqlite3 2016-09-08 01:00:36 +09:00
Yasuhiro Matsumoto bf2cfc371a fix build 2016-09-08 00:59:25 +09:00
Yasuhiro Matsumoto 467e3720d8 fix build 2016-09-08 00:39:47 +09:00
Yasuhiro Matsumoto 2bc6ac72c0 fix build 2016-09-08 00:30:54 +09:00
Yasuhiro Matsumoto a8bf79c7d7 Merge branch 'master' into trace 2016-09-08 00:15:31 +09:00
Yasuhiro Matsumoto 6f7ceed867 test of backup is too long 2016-09-08 00:15:10 +09:00
A.N 17a684694a Example program for the new SetTrace()
Does INSERT, then SELECT on the inserted rows (in-memory database).
The purpose of all these is to cause activity so there will be trace
messages to display. Trace message formatting is included
(a useful format, with explanations).
2016-09-07 23:48:36 +09:00