| Commit message (Expand) | Author | Age | Files | Lines |
| * | sqlite3.go: Remove -DSQLITE_ENABLE_FTS4_UNICODE61: not supported (#872)•••This option was enabled by default in sqlite3 on 2014-07-03.
This setting does nothing. It can now be disabled with
SQLITE_DISABLE_FTS3_UNICODE. See the upstream commit:
https://sqlite.org/src/info/0cc0230ae9cfc976
I think this change was imported into this project with commit
ee9da4840dd680d1fe2927692ea4ab5f8cd7c91c on 2015-06-12. | Evan Jones | 2020-11-17 | 1 | -1/+0 |
| * | sqlite3.go: remove -DSQLITE_DISABLE_INTRINSIC: better builds (#878)•••This "disables the use of compiler-specific built-in functions such
as __builtin_bswap32()" (from the SQLite docs) so this change might
produce slightly better code. My primary motivation, however, is that
the "default" configuration for SQLite, which is widely tested, does
not set this preprocessor macro.
From looking at Github issues, it appears this was added to avoid a
build error on Mac OS X 10.11, in 2017:
https://github.com/mattn/go-sqlite3/issues/386
There have been a number of changes to sqlite3 since we tried this
last. I think it would be worth trying to remove this setting again.
I found a machine running Mac OS X 10.11.6. It was able to build and
run the tests in this package with this change.
Mac OS X 10.11 is has not been supported by Apple since 2018
(currently Apple is releasing updates for Mac OS 10.13 and newer; 11
is the current release). However, Go 1.14 is supported, and it
requires Mac OS X 10.11 or newer: https://golang.org/doc/go1.14
Go 1.15 only supports Mac OS 10.12 and newer:
https://golang.org/doc/go1.15 | Evan Jones | 2020-11-17 | 1 | -1/+0 |
| * | Support vfs for Open (#877)•••Closes #876 | mattn | 2020-11-17 | 1 | -1/+11 |
| * | Fix "cannot start a transaction within a transaction" issue (#764) (#765)•••* Fix "cannot start a transaction within a transaction" issue
[why]
If db.BeginTx(ctx, nil) context is cancelled too fast, "BEGIN" statement can be
completed inside DB, but we still try to cancel it with sqlite3_interrupt.
In such case we get context.Cancelled or context.DeadlineExceeded from exec(),
but operation really completed. Connection returned into pool, and returns "cannot
start a transaction within a transaction" error for next db.BeginTx() call.
[how]
Handle status code returned from cancelled operation.
[testing]
Added unit-test which reproduces issue.
* Reduce TestQueryRowContextCancelParallel concurrency
[why]
Tests times out in travis-ci when run with -race option. | Andrii Zavorotnii | 2020-08-29 | 1 | -5/+16 |
| * | Use go-pointer instead of uintptr hacks. (#814)•••* Use go-pointer instead of uintptr hacks.
Fixes #791
* Do same of go-pointer
* Drop older verion of Go
* Fix build
* Fix build | mattn | 2020-08-26 | 1 | -10/+10 |
| * | Enable all prefixes for named parameters and allow for unused named parameter...•••* Allow unused named parameters
Try to bind all named parameters and ignore those not used.
* Allow "@" and "$" for named parameters
* Add tests for named parameters
Co-authored-by: Guido Berhoerster <guido+go-sqlite3@berhoerster.name> | gber | 2020-05-14 | 1 | -53/+77 |
| * | fix typo in doc comment (#770) | rittneje | 2019-12-17 | 1 | -3/+3 |
| * | add SystemErrno to Error (#740)•••* adding SystemErrno to Error, and fixing error logic when open fails
* fix for old versions of libsqlite3 that do not have sqlite3_system_errno defined
* fixing pre-processor logic
| rittneje | 2019-12-17 | 1 | -8/+27 |
| * | Merge pull request #744 from azavorotnii/ctx_cancel•••Fix context cancellation racy handling | mattn | 2019-11-19 | 1 | -37/+59 |
| |\ |
|
| | * | Fix context cancellation racy handling•••[why]
Context cancellation goroutine is not in sync with Next() method lifetime.
It leads to sql.ErrNoRows instead of context.Canceled often (easy to reproduce).
It leads to interruption of next query executed on same connection (harder to reproduce).
[how]
Do query in goroutine, wait when interruption done.
[testing]
Add unit test that reproduces error cases.
| Andrii Zavorotnii | 2019-09-06 | 1 | -37/+59 |
| * | | Add build constraints for non cgo | Yasuhiro Matsumoto | 2019-11-18 | 1 | -1/+1 |
| * | | Fix typo in "_locking_mode" DSN handling | Andrii Zavorotnii | 2019-09-23 | 1 | -1/+1 |
| * | | Fix Open() journal mode regression•••[why]
see https://github.com/mattn/go-sqlite3/issues/607
SQLite default journal mode is DELETE, but forcing it on open causes "database is locked"
if other connection exists with WAL mode, for example.
[how]
Don't set DELETE mode if not set in DSN explicitly.
[testing]
Run tests in my project where WAL mode is used.
| Andrii Zavorotnii | 2019-09-23 | 1 | -5/+6 |
| |/ |
|
| * | Fixed operator | G.J.R. Timmer | 2019-08-22 | 1 | -2/+2 |
| * | Fix _auth_* parameter check•••Fixes: #724 | G.J.R. Timmer | 2019-08-22 | 1 | -2/+2 |
| * | Issue #651: Fix of typo•••https://github.com/mattn/go-sqlite3/issues/651
| = | 2019-08-19 | 1 | -1/+1 |
| * | Fix type of variadic | Yasuhiro Matsumoto | 2019-05-10 | 1 | -1/+1 |
| * | column_type SQLITE_TEXT returned as string by default | Dimitri Roche | 2019-02-11 | 1 | -8/+1 |
| * | column types text, varchar, *char return as strings:•••As opposed to []byte arrays. This brings sqlite closer
in line with other dbs like postgres, allowing downstream
consumers to assume the scanned value is string across underlying
dbs.
| Dimitri Roche | 2019-02-11 | 1 | -2/+8 |
| * | Revert "SQLITE_OPEN_CREATE should be specified for sqlite3_open_v2 if mode is...•••This reverts commit 03b96a53baf1987fe52b653ce0d1817e549259b8.
| Jesse Rittner | 2018-12-08 | 1 | -16/+6 |
| * | SQLITE_OPEN_CREATE should be specified for sqlite3_open_v2 if mode is not rw•••Fixes #667
Fixes #669
| Yasuhiro Matsumoto | 2018-12-07 | 1 | -6/+16 |
| * | Close db even if sqlite3_open_v2 return non-zero. | Yasuhiro Matsumoto | 2018-12-07 | 1 | -0/+3 |
| * | Merge pull request #626 from otoolep/fix_data_race•••Fix data race in AutoCommit() | mattn | 2018-11-22 | 1 | -0/+2 |
| |\ |
|
| | * | Fix data race in AutoCommit()•••Detected via https://circleci.com/gh/rqlite/rqlite/2223.
| Philip O'Toole | 2018-08-30 | 1 | -0/+2 |
| * | | Merge pull request #643 from akalin/zero-length-blob•••Distinguish between NULL and zero-length blobs on query | mattn | 2018-11-22 | 1 | -1/+1 |
| |\ \ |
|
| | * | | Fix bug | Frederick Akalin | 2018-09-22 | 1 | -1/+1 |
| * | | | Merge pull request #644 from akalin/fix-pointer-conversion•••Clean up blob to byte slice conversion | mattn | 2018-11-22 | 1 | -7/+2 |
| |\ \ \ |
|
| | * | | | Use GoBytes | Frederick Akalin | 2018-09-22 | 1 | -7/+2 |
| | |/ / |
|
| * | | | Fix misspell issues.•••See,
$ gometalinter --vendor --disable-all --enable=misspell ./...
sqlite3.go:1379:45:warning: "succesfully" is a misspelling of "successfully" (misspell)
sqlite3.go:1390:30:warning: "registerd" is a misspelling of "registered" (misspell)
sqlite3_func_crypt.go:16:27:warning: "ceasar" is a misspelling of "caesar" (misspell)
sqlite3_func_crypt.go:43:59:warning: "Ceasar" is a misspelling of "Caesar" (misspell)
sqlite3_opt_userauth_test.go:450:27:warning: "succesful" is a misspelling of "successful" (misspell)
sqlite3_opt_userauth_test.go:456:27:warning: "succesful" is a misspelling of "successful" (misspell)
| Mario Trangoni | 2018-11-21 | 1 | -2/+2 |
| * | | | all: fix cgo compile failures on tip•••Apparently the cgo typechecks get better on tip, so use C.int instead
of Go integers.
Build tip as part of the Travis build, so we can ensure that any
errors are resolved before they get released to a wider audience.
| Kevin Burke | 2018-11-01 | 1 | -2/+2 |
| * | | | Rename the wrapper functions to not pollute the sqlite3_* namespace | Mura Li | 2018-10-20 | 1 | -15/+15 |
| * | | | Add support for sqlite3_unlock_notify | Mura Li | 2018-10-20 | 1 | -4/+41 |
| |/ / |
|
| * | | Fix build•••Related on #623
| Yasuhiro Matsumoto | 2018-09-11 | 1 | -1/+1 |
| * | | Merge pull request #623 from graf0/feature/#619•••implementation of set_authorizer interface | mattn | 2018-09-11 | 1 | -0/+55 |
| |\ \
| |/
|/| |
|
| | * | clearer const formatting•••with comments what const are used for what
| Grzegorz Marszałek | 2018-08-30 | 1 | -8/+13 |
| | * | implementation of set_authorizer interface | Grzegorz Marszałek | 2018-08-25 | 1 | -3/+53 |
| * | | Update go doc comments to refer to correct interfaces.•••sql.Driver, sql.Conn, sql.Tx sql.Stmt, and sql.Rows are not interfaces.
Updated the comments to refer to the correct interfaces: driver.Driver,
driver.Conn, driver.Tx, driver.Stmt, and driver.Rows.
| AndrewMurrell | 2018-08-21 | 1 | -6/+6 |
| |/ |
|
| * | Ensure that SqliteStmt.closed property is guarded.•••Because the closed property of the SQLiteRows's *SqliteStmt
was not guarded, it was causing an issue during context
cancellation.
https://github.com/segmentio/go-sqlite3/blob/be424d27acde822f080bdcd8a7ae6abd4d7d801e/sqlite3.go#L1785-L1796
When a statement is performing a query(), if it determines that
the context has been canceled, it will launch a goroutine that
closes the resulting driver.Rows if it's not already completed.
If the driver.Rows is not done (and the context has been canceled),
it will interrupt the connection and more importantly, perform
a rows.Close(). The method rows.Close() guards the closed bool with
a sync.Mutex to set it to true.
If a reader is reading from the SqliteRow, it will call Next()
and that performs this check:
https://github.com/segmentio/go-sqlite3/blob/be424d27acde822f080bdcd8a7ae6abd4d7d801e/sqlite3.go#L1915-L1917
Because this is not guarded, a data race ensues, and this was
actually caught by the Go race detector recently.
I didn't include a test case here because the fix seemed
straightforward enough and because race conditions are hard
to test for. It's been verified in another program that this
fixes the issue. If tests should be provided I'm more than
happy to do so.
| Collin Van Dyck | 2018-07-19 | 1 | -2/+2 |
| * | fix/118•••* Added TestMultiBlobs
* Removed dead code
Fixes #118 | Gert-Jan Timmer | 2018-06-12 | 1 | -2/+0 |
| * | Adds GetFilename (sqlite3_db_filename) to SqliteConn | Zachary Gramana | 2018-06-12 | 1 | -0/+11 |
| * | Merge pull request #586 from mattn/feature/userauth•••Feature/userauth | mattn | 2018-06-08 | 1 | -2/+185 |
| |\ |
|
| | * | ADD: User Authentication Password Encoders•••Allow user to choose how to encode passwords with connection string overrides of embedded `sqlite_crypt` function. | Gert-Jan Timmer | 2018-06-05 | 1 | -0/+58 |
| | * | Implemented goconvey for User Authentication Tests•••Reference #580 | Gert-Jan Timmer | 2018-06-04 | 1 | -5/+5 |
| | * | Update User Authentication•••* Update bindings
* Add user authentication sql functions
Reference #579 | Gert-Jan Timmer | 2018-06-01 | 1 | -12/+18 |
| | * | Stash•••[ci skip] | Gert-Jan Timmer | 2018-05-31 | 1 | -4/+4 |
| | * | UPD: User Authentication•••Implemented table check; only activate User Authentication on a database which has no UA enabled.
Closes #582 | Gert-Jan Timmer | 2018-05-31 | 1 | -8/+2 |
| | * | ADD: User authentication•••* User Authentication Implementation
* Rename file to conform to fileformat `sqlite3_*_omit.go`
* Updated sqlite3-binding.* with new upgrade tool
* Add: callbackRetNil required for error type return because of adding `RegisterFunc`s directly on the connection.
* Add: TestCreateAuthDatabase
| Gert-Jan Timmer | 2018-05-30 | 1 | -2/+127 |
| * | | Add nil check in bind and a test | Lucas Manuel Rodriguez | 2018-05-30 | 1 | -4/+8 |
| |/ |
|
| * | Fix: Display of secure_delete error message | Gert-Jan Timmer | 2018-05-29 | 1 | -1/+1 |
| * | Fix: Condition of queryOnly Variable | Gert-Jan Timmer | 2018-05-29 | 1 | -1/+1 |