aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go (follow)
Commit message (Expand)AuthorAgeFilesLines
* only enable pread/pwrite for linux. fixes #533 and fixes #532Bas van Beek2018-02-171-1/+2
* Let SQLite use pread/pwrite•••With current settings SQLite was using lseek/read syscalls to read data, e.g.: 20:43:17.640660 fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0 20:43:17.640683 fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0 20:43:17.640705 fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0 20:43:17.640725 fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0 20:43:17.640744 stat(".../neo.sqlite-journal", 0x7ffef2c91080) = -1 ENOENT (No such file or directory) 20:43:17.640764 lseek(3, 24, SEEK_SET) = 24 20:43:17.640779 read(3, "\0\0\0\33\0\0\10\235\0\0\10]\0\0\0\27", 16) = 16 20:43:17.640795 stat(".../neo.sqlite-wal", 0x7ffef2c91080) = -1 ENOENT (No such file or directory) but if we allow it to use pread it will be only 1 system call instead of 2 and reading this way can also be done in parallel because there is no global to file seeking: 20:48:42.668466 fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0 20:48:42.668501 fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0 20:48:42.668522 fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0 20:48:42.668542 fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0 20:48:42.668561 stat(".../neo.sqlite-journal", 0x7ffdbc1f22c0) = -1 ENOENT (No such file or directory) 20:48:42.668580 pread64(3, "\0\0\0\33\0\0\10\235\0\0\10]\0\0\0\27", 16, 24) = 16 20:48:42.668597 stat(".../neo.sqlite-wal", 0x7ffdbc1f22c0) = -1 ENOENT (No such file or directory) (if needed this enablement can be done per OS) Kirill Smelkov2018-02-161-1/+1
* Merge pull request #525 from mattn/add-usleep•••add -DHAVE_USLEEP=1mattn2018-02-071-1/+1
|\
| * add -DHAVE_USLEEP=1•••fixes #211 Yasuhiro Matsumoto2018-02-071-1/+1
* | Add static_mock.go to allow building with CGO_ENABLED=0James C Kimble2018-01-311-0/+2
|/
* Merge pull request #462 from faruzzy/master•••Updated "context" import since it has become a standard library mattn2018-01-121-2/+1
|\
| * Updated "context" import since it has become a standard library after go 1.7 ...Roland Pangu2017-09-051-2/+1
* | Fix race in ExecContext•••When the context is cancelled, an interrupt should only be made if the operation is still ongoing. Niklas Janlert2017-11-211-2/+6
* | Merge pull request #479 from kenshaw/move-registeraggregator•••Move RegisterAggregator implementationmattn2017-11-141-0/+127
|\ \
| * | Move RegisterAggregator implementation•••The SQLiteConn.RegisterAggregator implementation was defined in sqlite3_trace.go file, which is guarded with a build constraint. This change simply moves RegisterAggregator to the main sqlite3.go file, and moves accompanying unit tests. The rationale for this move is that it was not possible for downstream using packages to use RegisterAggregator without also specifying (and notifying the user) the 'trace' build tag. Kenneth Shaw2017-11-051-0/+127
| |/
* | fix to be able to build with GOTAGS=libsqlite3Tetsuya Morimoto2017-11-051-0/+2
* | update to call _sqlite3_limit as a wrapper instead of sqlite3_limitTetsuya Morimoto2017-11-051-2/+26
* | support sqlite3_limit to get/set run time limitTetsuya Morimoto2017-11-051-0/+30
|/
* Merge branch 'master' into mastermattn2017-08-301-16/+136
|\
| * fix raceYasuhiro Matsumoto2017-08-301-10/+10
| * fix raceYasuhiro Matsumoto2017-08-301-1/+0
| * fix lockYasuhiro Matsumoto2017-08-301-2/+24
| * fixes #458Yasuhiro Matsumoto2017-08-281-0/+1
| * Fix to pass TestNilAndEmptyBytesGreg Holt2017-08-211-2/+3
| * remove mutexYasuhiro Matsumoto2017-08-021-5/+4
| * fix possibly double Close.•••fixes #448 Yasuhiro Matsumoto2017-08-021-5/+9
| * Add connection option for recursive triggers•••Similar to foreign keys, the recursive triggers PRAGMA affects the interpretation of all statements on a connection. Ross Light2017-07-091-0/+26
| * Merge pull request #2 from mattn/master•••Merge lastest from mattnJason Abbott2017-07-061-1/+1
| |\
| | * SQLITE_THREADSAFE=1•••fixes #274 Yasuhiro Matsumoto2017-07-051-1/+1
| * | Incorporate original PR 271 from https://github.com/brokensandalsJason Abbott2017-07-031-0/+54
| |/
| * Don't convert Unix times to nanoseconds when querying datetime fields. Fixes ...deepilla2017-06-301-2/+3
| * Fix for cgo panic, issue #428: https://github.com/mattn/go-sqlite3/issues/428Evgeniy Makeev2017-06-201-7/+4
| * Sync database-close and statement-close•••Potential fix for issue #426. Philip O'Toole2017-06-171-1/+14
| * Use global variable for better performance.Xu Xinran2017-06-141-3/+4
| * Treat []byte{} as empty bytes instead of NULL.Xu Xinran2017-06-141-2/+4
* | Add support for collation sequences implemented in Go.•••This allows Go programs to register custom comparison functions with sqlite, and ORDER BY that comparator. David Anderson2017-06-081-0/+25
|/
* Merge pull request #407 from zombiezen/foreignkeys•••Add _foreign_keys connection parametermattn2017-04-021-3/+43
|\
| * Add _foreign_keys connection parameter•••Fixes #377 Updates #255 Ross Light2017-04-011-3/+43
* | Avoid leaking db if setting busy timeout failsRoss Light2017-04-011-0/+1
|/
* Removed ambitious conn.Close()Marko Kungla2017-03-241-1/+0
* close connection when got errors in OpenYasuhiro Matsumoto2017-03-241-0/+3
* fix breaking compatibility.•••revert cf4bd560f1588d96c502b4c3407fe1a10cef4a28 close #394 Yasuhiro Matsumoto2017-03-211-6/+6
* fix buildYasuhiro Matsumoto2017-03-201-2/+2
* fix buildYasuhiro Matsumoto2017-03-201-3/+3
* fix buildYasuhiro Matsumoto2017-03-201-1/+1
* return nil when last error is SQLITE_OKYasuhiro Matsumoto2017-03-201-1/+5
* refactoringYasuhiro Matsumoto2017-03-051-2/+2
* Add Go API for virtual tables•••See https://www.sqlite.org/vtab.html for more details. This work was started from https://github.com/gwenn/gosqlite/blob/master/vtab.{c,go} and adds: - Porting the API to go-sqlite3 APIs. - Support for >= Go 1.6 without requiring the `cgocheck` flag to be changed. - Filling out the unfinished callback functions for the `Vtable` struct. - A simple `Context` API layer for ease of use when adding modules. Tests are included. Conor Branagan2017-03-041-1/+1
* rename functionYasuhiro Matsumoto2017-03-051-2/+2
* workaround for a compiler•••Apple LLVM version 7.0.2 (clang-700.1.81) Close #386 Yasuhiro Matsumoto2017-03-011-0/+1
* use variable dbYasuhiro Matsumoto2017-02-161-1/+1
* fixes raceYasuhiro Matsumoto2017-02-111-4/+8
* close statementYasuhiro Matsumoto2017-01-071-0/+1
* fix race conditionYasuhiro Matsumoto2017-01-031-3/+3
* fix named argsYasuhiro Matsumoto2016-12-091-1/+1