Commit Graph

888 Commits

Author SHA1 Message Date
Philip O'Toole abfacf5684 Fix data race in AutoCommit()
Detected via https://circleci.com/gh/rqlite/rqlite/2223.
2018-08-30 05:47:34 -07:00
Grzegorz Marszałek df0c034d7c clearer const formatting
with comments what const are used for what
2018-08-30 10:25:56 +02:00
Grzegorz Marszałek e30f9ffa3a implementation of set_authorizer interface 2018-08-25 20:25:16 +02:00
mattn 3198c7714d
Merge pull request #621 from AndrewMurrell/master
Update go doc comments to refer to correct interfaces.
2018-08-24 23:21:20 +09:00
AndrewMurrell e20c81b825 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.
2018-08-21 20:46:58 -04:00
Kurt Jung 0109106b87
Update README: URL-encode connection options
This change could save users from having to dig into source code to see how connection options are parsed.
2018-08-12 08:34:51 -04:00
Collin Van Dyck b3511bfdd7 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.

be424d27ac/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:

be424d27ac/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.
2018-07-19 11:16:09 +02:00
Ingve Vormestrand 3aefd9f0a1 Fix typo in readme 2018-07-02 20:40:57 +02:00
Gert-Jan Timmer f08fefa53a fix/306
* ppc
* ppc64
* ppc64le
2018-06-28 11:44:40 +02:00
Gert-Jan Timmer a3114e1a2c fix/306
Add: -lpthread for ppc / ppc64

Issue: #306

[ci ckip]
2018-06-28 11:44:40 +02:00
Gert-Jan Timmer 25ecb14adf Add: OpenBSD
Fixes #321
2018-06-13 10:33:23 +02:00
Gert-Jan Timmer dfef8b7b8d Moved solaris flag from _other.go => _solaris.go 2018-06-13 10:33:23 +02:00
mattn 1013924b66
Merge pull request #592 from GJRTimmer/fix/test/coverage
fix/test/coverage
2018-06-13 10:15:40 +09:00
mattn 3be672de51
Merge pull request #596 from mattn/fix/travis
Update Travis-CI
2018-06-13 09:46:20 +09:00
Gert-Jan Timmer 7926b8ed96 Update Travis-CI
Moved `sqlite_vacuum_incr` and `sqlite_vtable` to module job.

* `sqlite_vacuum_incr` will only store the required auto vacuum information into the datbase page, and not peform an vacuum therefor this can be added easily to the module job.
- `sqlite_vtable` does not require an seperate job because user will include the tag in combination with others.
2018-06-12 17:27:42 +02:00
Gert-Jan Timmer 20c4bd2e63 fix/511
Closes #511

[skip ci]
2018-06-12 15:45:36 +02:00
Gert-Jan Timmer 578beef531 fix/209
Closes #209

[skip ci]
2018-06-12 14:23:08 +02:00
Gert-Jan Timmer 668824341d Add Tests for Crypt Encoders
* Increase coverage
2018-06-12 13:57:14 +02:00
Gert-Jan Timmer d9455abc35 Rewrite Tests UserAuth
* Removed Goconvey
* Fix coveralls.io
2018-06-12 13:57:14 +02:00
Yoann Cerda d31a44a0bd Use t.Skip for TestUpsert to be compliant with the actual cade base. 2018-06-12 13:55:59 +02:00
Yoann Cerda 2439c84c29 fix upsert log typos. 2018-06-12 13:55:59 +02:00
Yoann Cerda a06d1c9512 bump sqlite3 3.24.0 and add TestUpsert. 2018-06-12 13:55:59 +02:00
mattn ecf0c3a828
Merge pull request #591 from mattn/fix/118
fix/118
2018-06-12 18:20:33 +09:00
mattn 53f6d424ab
Merge pull request #574 from GJRTimmer/update/travis
Follow official Release Policy
2018-06-12 18:17:37 +09:00
Gert-Jan Timmer 62b7bd5f54 fix/118
* Added TestMultiBlobs
* Removed dead code

Fixes #118
2018-06-12 11:06:00 +02:00
Zachary Gramana f268891078 Adds GetFilename (sqlite3_db_filename) to SqliteConn 2018-06-12 10:33:32 +02:00
mattn 4218441e44
Merge pull request #586 from mattn/feature/userauth
Feature/userauth
2018-06-08 10:05:37 +09:00
Gert-Jan Timmer 4ba9507ff0 Fix: test suite remove created files 2018-06-05 13:45:46 +02:00
Gert-Jan Timmer 7337e65c27 ADD: User Authentication Password Encoders
Allow user to choose how to encode passwords with connection string overrides of embedded `sqlite_crypt` function.
2018-06-05 13:45:32 +02:00
Gert-Jan Timmer 9b30110b83 ADD: sqlite_auth to goconvey test suite 2018-06-05 13:43:35 +02:00
Gert-Jan Timmer f46bde7099 Update User Authentication Documentation
References: #581
2018-06-05 13:43:07 +02:00
Gert-Jan Timmer 55a3551baa Add: goconvey to Travis-CI 2018-06-05 13:28:26 +02:00
Gert-Jan Timmer 086629727d Add inital documentation
References: #581
2018-06-05 12:20:54 +02:00
Gert-Jan Timmer 5d4828a820 Update TestUserAuthentication*
* Update goconvey profile
* Divided tests in categories

Reference #580
2018-06-04 17:04:29 +02:00
Gert-Jan Timmer 11627e4483 Implemented goconvey for User Authentication Tests
Reference #580
2018-06-04 15:50:00 +02:00
Gert-Jan Timmer 90f966bed9 Add additional tests
Reference: #580
2018-06-01 11:28:29 +02:00
Gert-Jan Timmer 0e289439a2 Update User Authentication
* Update bindings
* Add user authentication sql functions

Reference #579
2018-06-01 11:28:04 +02:00
Gert-Jan Timmer 4a33fcc1d2 Stash
[ci skip]
2018-05-31 16:42:03 +02:00
mattn 6d0b39d7bc
Merge pull request #583 from lucasmrod/bug/#542-nil-byte-slice-to-null-blob
Add nil check in bind and a test
2018-05-31 22:29:18 +09:00
Gert-Jan Timmer f7f8019102 UPD: TestAuthCreateDatabase
* Renamed test
* Implemented 'exists' test
* WIP #580
2018-05-31 14:57:32 +02:00
Gert-Jan Timmer 183e7d61d1 UPD: User Authentication
Implemented table check; only activate User Authentication on a database which has no UA enabled.

Closes #582
2018-05-31 14:55:22 +02:00
Lucas Manuel Rodriguez 140b80506d Add zero-length slice test 2018-05-31 08:22:26 -03:00
Gert-Jan Timmer 2d9b52a482 Fix: Free memory 2018-05-31 09:46:38 +02:00
Lucas Manuel Rodriguez 8d6d326be6 Add nil check in bind and a test 2018-05-30 21:39:01 -03:00
Gert-Jan Timmer 6ae7f98274 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
2018-05-30 23:48:02 +02:00
Gert-Jan Timmer 3367a7a5f9 Rewrite Upgrade Tool
* Reformat code
* Add download for sqlite-src-*
* Add extract for sqlite source
* Add auto merge of UserAuth module into Amalgamation
2018-05-30 23:48:02 +02:00
mattn 5a7d2e245e
Merge pull request #577 from GJRTimmer/update/docs
Add: Reference to Spatialite
2018-05-31 00:22:18 +09:00
Gert-Jan Timmer 2c4bacc57f Add: Reference to Spatialite
Closes #512

[ci ckip]
2018-05-30 16:28:06 +02:00
Yasuhiro Matsumoto 52b8080d4d
update README.md 2018-05-30 00:11:22 +09:00
mattn 6f53a20d71
Merge pull request #573 from GJRTimmer/fix/pragma
Added PRAGMA's
2018-05-30 00:08:50 +09:00