glebarez
ad0f1ce269
fix TestColumnTypes
2021-12-12 12:08:32 +01:00
Jan Mercl
333ac00e6b
linux/arm: regenerate
2021-11-01 22:34:01 +01:00
Jan Mercl
6f800703d3
TestConcurrentProcesses: enlarge timeout, enables slow builders to pass
2021-10-24 18:00:29 +02:00
Dan Peterson
064df839a4
driver: support _time_format DSN query param
...
Building on the _pragma query param support added in 508747c9
, support
a new _time_format query param.
If _time_format is set to "sqlite", written times use the time package
format "2006-01-02 15:04:05.999999999-07:00". This is the format
mattn/go-sqlite3 uses and is format 4 at
https://sqlite.org/lang_datefunc.html#time_values .
By default, times are formatted with time.Time.String. This maintains
compatibility with existing users of the driver.
Fixes #47
2021-10-23 15:36:02 -03:00
Dan Peterson
a530c91309
driver: return error strings for constraint errors
...
In conn.step, use conn.errstr which gets the error from sqlite instead
of looking up the result code in the ErrorCodeString map.
This changes the code 5 (SQLITE_BUSY) message slightly, including
"database is locked" as returned my errstr. "SQLITE_BUSY" is still
added to the message.
Fixes #73
2021-10-23 09:42:14 -03:00
Jan Mercl
da74fa6c39
remove --trace 2 from TestConcurrentProcesses
2021-09-25 10:53:13 +02:00
Jan Mercl
fa683c81c6
add test, updates #65
2021-09-17 12:38:44 +02:00
Jan Mercl
e3be4b029c
fix retry logic around conn.step, updates #66
2021-09-14 16:20:20 +02:00
Jan Mercl
e1d8d213c1
Fix invalid test, resolves #70
2021-09-13 13:50:13 +02:00
Jan Mercl
7f27fe4762
add TestIssue70, updates #70
2021-09-13 12:00:13 +02:00
Jan Mercl
65c49f4def
freebsd/amd64: initial port, GO111MODULE=off only, updates libc#10.
2021-09-04 21:39:54 +02:00
Jan Mercl
8efc1b0753
windows: fix TestPersistPragma.3, updates #67
2021-09-01 14:38:12 +02:00
Jan Mercl
aa7d275125
windows: fix TestPersistPragma.2, updates #67
2021-09-01 14:24:15 +02:00
Jan Mercl
7ecaceaa8f
windows: fix TestPersistPragma, updates #67
2021-09-01 14:06:04 +02:00
Logan
508747c957
Persist pragma configurations via url parameter
2021-08-19 00:02:34 +00:00
Jan Mercl
ffc4be292a
update all targets but darwin/arm64 to SQLite 3.36, updates #23
2021-06-21 12:21:04 +02:00
Jason DeBettencourt
cc37e09f4c
close db after test case
2021-06-10 21:25:36 -04:00
Jason DeBettencourt
ff775b367c
all_test.go - remove the temp db between scripts to prevent not quite closed/deleted/race.
...
malloc5.test - skip tests requiring memstats collection
pager1.test - skip 2 tests in non-functional sets.
snapshot_fault.test - skip test w/failing forcedelete
testdata/tcl/tester.tcl - fix get_pwd to return output of 'cd'
2021-06-09 18:44:35 -04:00
Jan Mercl
a740e9e176
add reproducer, updates #53
2021-05-05 12:05:52 +02:00
Dan Peterson
ca47b106c9
fix and enable TestIssue51, updates #51
2021-04-30 16:30:26 -03:00
Jan Mercl
4a946a98e9
update dependencies, disable TestIssue51
2021-04-18 14:36:48 +02:00
Jan Mercl
eb8fb3b86d
add TestIssue51, updates #51
2021-04-16 10:40:07 +02:00
Dan Peterson
e2b915c98c
driver: set libc environment in init
...
modernc.org/libc.Start does this when wrapping funcs main to seed data
for libc.Xgetenv and friends.
However, sqlite doesn't use libc.Start. It sets libc bits up in an
init func. This leaves the libc view of the enivorment empty/null.
When the sqlite "localtime" modifier used with datetime/strftime/etc,
sqlite eventually calls libc.Xlocaltime which wants to read TZ from
the environment. With an empty/null libc enivornment, this segfaults.
To fix that, call libc.SetEnviron in func init like libc.Start
does.
Fixes https://gitlab.com/cznic/sqlite/-/issues/49
2021-04-05 20:35:19 -03:00
Dan Peterson
798bbeb9bb
driver: support scanning more formats into time.Time
...
Fixes https://gitlab.com/cznic/sqlite/-/issues/46
2021-03-14 16:07:07 -03:00
Dan Peterson
77ccaf71ff
driver: return column info even when no rows
...
Fixes https://gitlab.com/cznic/sqlite/-/issues/32
2021-03-14 13:09:25 -03:00
Jason DeBettencourt
9132cd04c3
Translate line endings for test reference output (*nix -> windows), as git changes by default to windows
2021-02-27 18:57:14 -05:00
Jan Mercl
5ab7e771a8
enable memgrind
2021-02-17 18:42:44 +01:00
Dan Peterson
2d062fa148
driver: support ?NNN and $NNN parameters, add tests
...
Fix a bug around ensuring each index matches a corresponding
argument.
Support ?NNN parameters by checking for a match between NNN and
Ordinal. Do the same for $NNN even though $NNN should technically
require sql.Named.
Updates https://gitlab.com/cznic/sqlite/-/issues/42 .
2021-01-18 11:23:00 -04:00
Jan Mercl
132978c738
bump libc,tcl version
2021-01-17 11:38:58 +01:00
Jan Mercl
bfeff02653
enable memory auditing in most tests/benchmarks using -tags=libc.memgrind
2021-01-16 16:46:44 +01:00
Jan Mercl
90dac3ac7b
rows.Next: support scanning of time values, fixes #35
2021-01-10 15:26:54 +01:00
Jan Mercl
1c17040813
Make benchmarks try different table sizes
...
jnml@3900x:~/src/modernc.org/sqlite$ go test -tags cgobench -run @ -bench . -recs_per_sec_as_mbps |& tee log
test binary compiled for linux/amd64
goos: linux
goarch: amd64
pkg: modernc.org/sqlite
BenchmarkInsertMemory/1e1-24 17526 69420 ns/op 144051.54 MB/s 2242 B/op 70 allocs/op
BenchmarkInsertMemory/1e2-24 1861 713302 ns/op 140192.98 MB/s 22427 B/op 700 allocs/op
BenchmarkInsertMemory/1e3-24 168 6949300 ns/op 143899.38 MB/s 230079 B/op 7744 allocs/op
BenchmarkInsertMemory/1e4-24 16 66353146 ns/op 150708.76 MB/s 2320327 B/op 79748 allocs/op
BenchmarkInsertMemory/1e5-24 2 2125566987 ns/op 47046.27 MB/s 23211064 B/op 799876 allocs/op
BenchmarkInsertMemory/1e6-24 1 32409599180 ns/op 30855.06 MB/s 232210448 B/op 8001572 allocs/op
BenchmarkNextMemory/1e1-24 181816 6783 ns/op 1474180.21 MB/s 16 B/op 1 allocs/op
BenchmarkNextMemory/1e2-24 22436 52581 ns/op 1901822.13 MB/s 16 B/op 1 allocs/op
BenchmarkNextMemory/1e3-24 2810 461729 ns/op 2165773.65 MB/s 12432 B/op 1645 allocs/op
BenchmarkNextMemory/1e4-24 264 4671249 ns/op 2140755.03 MB/s 156432 B/op 19645 allocs/op
BenchmarkNextMemory/1e5-24 2 552415982 ns/op 181023.00 MB/s 1596432 B/op 199645 allocs/op
BenchmarkNextMemory/1e6-24 1 5283792426 ns/op 189258.00 MB/s 15996480 B/op 1999645 allocs/op
BenchmarkReading1/sqliteInMemory1e1-24 154976 6895 ns/op 1450348.96 MB/s 16 B/op 1 allocs/op
BenchmarkReading1/sqliteInMemory1e2-24 22861 52974 ns/op 1887724.10 MB/s 16 B/op 1 allocs/op
BenchmarkReading1/sqliteInMemory1e3-24 2499 449004 ns/op 2227153.62 MB/s 12432 B/op 1645 allocs/op
BenchmarkReading1/sqliteInMemory1e4-24 264 4504266 ns/op 2220117.55 MB/s 156432 B/op 19645 allocs/op
BenchmarkReading1/sqliteInMemory1e5-24 2 543267468 ns/op 184071.39 MB/s 1596432 B/op 199645 allocs/op
BenchmarkReading1/sqliteInMemory1e6-24 1 5504469406 ns/op 181670.55 MB/s 15996464 B/op 1999645 allocs/op
BenchmarkReading1/sqlite3InMemory1e1-24 165736 7426 ns/op 1346699.36 MB/s 320 B/op 37 allocs/op
BenchmarkReading1/sqlite3InMemory1e2-24 20946 55017 ns/op 1817631.77 MB/s 2480 B/op 307 allocs/op
BenchmarkReading1/sqlite3InMemory1e3-24 1741 619309 ns/op 1614701.91 MB/s 37232 B/op 4651 allocs/op
BenchmarkReading1/sqlite3InMemory1e4-24 200 5970890 ns/op 1674792.32 MB/s 397235 B/op 49651 allocs/op
BenchmarkReading1/sqlite3InMemory1e5-24 19 61240730 ns/op 1632900.20 MB/s 3997259 B/op 499651 allocs/op
BenchmarkReading1/sqlite3InMemory1e6-24 2 620411424 ns/op 1611833.63 MB/s 39997508 B/op 4999652 allocs/op
BenchmarkReading1/sqliteOnDisk1e1-24 179678 7028 ns/op 1422927.68 MB/s 16 B/op 1 allocs/op
BenchmarkReading1/sqliteOnDisk1e2-24 25140 47970 ns/op 2084640.49 MB/s 16 B/op 1 allocs/op
BenchmarkReading1/sqliteOnDisk1e3-24 2340 442164 ns/op 2261602.38 MB/s 12432 B/op 1645 allocs/op
BenchmarkReading1/sqliteOnDisk1e4-24 266 4515133 ns/op 2214773.96 MB/s 156432 B/op 19645 allocs/op
BenchmarkReading1/sqliteOnDisk1e5-24 3 446614930 ns/op 223906.53 MB/s 1596437 B/op 199645 allocs/op
BenchmarkReading1/sqliteOnDisk1e6-24 1 4326258166 ns/op 231146.63 MB/s 15996464 B/op 1999645 allocs/op
BenchmarkReading1/sqlite3OnDisk1e1-24 119437 9782 ns/op 1022315.11 MB/s 320 B/op 37 allocs/op
BenchmarkReading1/sqlite3OnDisk1e2-24 20011 58941 ns/op 1696624.22 MB/s 2480 B/op 307 allocs/op
BenchmarkReading1/sqlite3OnDisk1e3-24 1981 605212 ns/op 1652313.10 MB/s 37232 B/op 4651 allocs/op
BenchmarkReading1/sqlite3OnDisk1e4-24 195 6269972 ns/op 1594903.42 MB/s 397234 B/op 49651 allocs/op
BenchmarkReading1/sqlite3OnDisk1e5-24 18 62079585 ns/op 1610835.51 MB/s 3997248 B/op 499651 allocs/op
BenchmarkReading1/sqlite3OnDisk1e6-24 2 612785354 ns/op 1631892.79 MB/s 39997520 B/op 4999652 allocs/op
PASS
ok modernc.org/sqlite 280.633s
jnml@3900x:~/src/modernc.org/sqlite$ ok
2021-01-07 15:07:26 +01:00
Jan Mercl
b89c2c19aa
enable windows/{amd64,386} build
2020-12-21 21:10:07 +01:00
Jan Mercl
736c530ac7
implement sql.{RowsColumnTypeScanType,RowsColumnTypeDatabaseTypeName,RowsColumnTypeLength,RowsColumnTypeNullable,RowsColumnTypePrecisionScale}, fixes #30
2020-09-25 15:12:39 +02:00
Jan Mercl
a4318db8c7
handle properly 0 rows query results, fixes #28
2020-09-21 18:36:03 +02:00
Jan Mercl
f228816300
support linux/arm{,64}
2020-09-13 15:31:23 +02:00
Jan Mercl
e662a135d1
release 1.4.0
2020-08-26 23:31:54 +02:00
Jan Mercl
1349149922
use crt v3.24.9
2020-07-31 14:18:38 +02:00
Jan Mercl
3337c85b5e
103 errors out of 202628 tests on Linux 64-bit little-endian
2020-07-30 17:13:42 +02:00
Jan Mercl
2491c1ae5a
575 errors out of 200676 tests on Linux 64-bit little-endian
...
All memory allocations freed - no leaks
2020-07-28 18:42:57 +02:00
Jan Mercl
b406626c64
release v1.4.0-beta1
2020-07-26 22:36:18 +02:00
Jan Mercl
141c3f22b7
fix forgotten TODO
2020-01-01 12:05:39 +01:00
Jan Mercl
ef38ac9c3b
use sqlite3_unlock_notify, fixes #20 .
2019-12-31 16:46:08 +01:00
Jan Mercl
45936a375a
fix (*stmt).Close logic, closes #19
2019-12-28 11:10:32 +01:00
Jan Mercl
6efd3c7000
v1.1.0-alpha.2
2019-12-26 17:24:51 +01:00
Jan Mercl
8717080461
add concurrent inserts test
2019-12-21 11:00:50 +01:00
Jan Mercl
0bd6d67fef
prepare pre-alpha release
2019-12-18 17:51:11 +01:00
Jan Mercl
89fd60bf68
Make modernc.org the repository root
2018-11-06 18:03:25 +01:00
Jan Mercl
91382a8425
Fix Windows build.
...
modified: Makefile
modified: all_test.go
modified: internal/bin/bin_linux_386.go
modified: internal/bin/bin_linux_amd64.go
new file: z_linux_test.go
2017-07-04 17:14:51 +02:00
Jan Mercl
2aa5e95243
Add TestThread3 (does not yet pass). Updates #15 .
...
modified: Makefile
modified: all_test.go
modified: generator.go
modified: internal/bin/bin_linux_386.go
modified: internal/bin/bin_linux_amd64.go
new file: internal/threadtest3/threadtest3_linux_386.go
new file: internal/threadtest3/threadtest3_linux_amd64.go
2017-07-03 23:36:03 +02:00