sqlite3 1.6.6-x86-linux → 1.6.8-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/Gemfile +2 -3
- data/dependencies.yml +8 -8
- data/ext/sqlite3/extconf.rb +6 -1
- data/lib/sqlite3/2.7/sqlite3_native.so +0 -0
- data/lib/sqlite3/3.0/sqlite3_native.so +0 -0
- data/lib/sqlite3/3.1/sqlite3_native.so +0 -0
- data/lib/sqlite3/3.2/sqlite3_native.so +0 -0
- data/lib/sqlite3/database.rb +17 -2
- data/lib/sqlite3/version.rb +2 -2
- data/test/test_database.rb +45 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b795cd15e9b728c471c7b0a88148f2c0133f62c331cff0e9afa4aa8a33b2005
|
4
|
+
data.tar.gz: 76644cbd3c61713948fec217a88da90c3fb03a38d087996c2e302719678685d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6b8d41a7eec5b8fb4c50083b077600bd9f6650250e9adbd572402a101d331a66603de47faf7c188601081dd09803f77b0d90167e81dfca55bfb0c5eb99fb00f
|
7
|
+
data.tar.gz: 73027ea8a03b510c3b3476291a5310308b1886813410f670f17f4dc9f27a14d4150c0664e70d227860102ad8fb8ce9d2734a8cd2a0c3d37f7776ea614ffc4eaf
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,37 @@
|
|
1
1
|
# sqlite3-ruby Changelog
|
2
2
|
|
3
|
+
## 1.6.8 / 2023-11-01
|
4
|
+
|
5
|
+
### Dependencies
|
6
|
+
|
7
|
+
- Vendored sqlite is updated to [v3.44.0](https://sqlite.org/releaselog/3_44_0.html). @flavorjones
|
8
|
+
- rake-compiler-dock updated to v1.3.1 for precompiled native gems. @flavorjones
|
9
|
+
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- `SQLite3::Database.open` now returns the block result. Previously this returned the Database object. [#415] @toy
|
14
|
+
- Documentation improvement in `lib/sqlite3/database.rb`. [#421] @szTheory
|
15
|
+
|
16
|
+
|
17
|
+
## 1.6.7 / 2023-10-10
|
18
|
+
|
19
|
+
### Dependencies
|
20
|
+
|
21
|
+
Vendored sqlite is updated to [v3.43.2](https://sqlite.org/releaselog/3_43_2.html).
|
22
|
+
|
23
|
+
Upstream release notes:
|
24
|
+
|
25
|
+
> - Fix a couple of obscure UAF errors and an obscure memory leak.
|
26
|
+
> - Omit the use of the sprintf() function from the standard library in the [CLI](https://sqlite.org/cli.html), as this now generates warnings on some platforms.
|
27
|
+
> - Avoid conversion of a double into unsigned long long integer, as some platforms do not do such conversions correctly.
|
28
|
+
|
29
|
+
|
30
|
+
### Added
|
31
|
+
|
32
|
+
* Compile packaged sqlite3 with additional flags to explicitly enable FTS5, and set synchronous mode to normal when in WAL mode. [#408] (@flavorjones)
|
33
|
+
|
34
|
+
|
3
35
|
## 1.6.6 / 2023-09-12
|
4
36
|
|
5
37
|
### Dependencies
|
data/Gemfile
CHANGED
@@ -4,8 +4,7 @@ gemspec
|
|
4
4
|
|
5
5
|
gem("minitest", "5.20.0")
|
6
6
|
gem("rake-compiler", "1.2.5")
|
7
|
-
gem("rake-compiler-dock", "1.3.
|
7
|
+
gem("rake-compiler-dock", "1.3.1")
|
8
8
|
gem("rdoc", "6.5.0")
|
9
|
-
gem("psych", "5.1.0")
|
10
9
|
|
11
|
-
gem("ruby_memcheck", "2.
|
10
|
+
gem("ruby_memcheck", "2.2.0") if Gem::Platform.local.os == "linux"
|
data/dependencies.yml
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# TODO: stop using symbols here once we no longer support Ruby 2.7 and can rely on symbolize_names
|
2
2
|
:sqlite3:
|
3
3
|
# checksum verified by first checking the published sha3(256) checksum against https://sqlite.org/download.html:
|
4
|
+
# 6869046465eae886f1a9f2c8debeeba44d34328693aa77a5bd4a3cfed93d6556
|
4
5
|
#
|
5
|
-
# $ sha3sum -a 256 ports/archives/sqlite-autoconf-
|
6
|
-
#
|
6
|
+
# $ sha3sum -a 256 ports/archives/sqlite-autoconf-3440000.tar.gz
|
7
|
+
# 6869046465eae886f1a9f2c8debeeba44d34328693aa77a5bd4a3cfed93d6556 ports/archives/sqlite-autoconf-3440000.tar.gz
|
7
8
|
#
|
8
|
-
# $ sha256sum ports/archives/sqlite-autoconf-
|
9
|
-
#
|
10
|
-
|
11
|
-
:version: "3.43.1"
|
9
|
+
# $ sha256sum ports/archives/sqlite-autoconf-3440000.tar.gz
|
10
|
+
# b9cd386e7cd22af6e0d2a0f06d0404951e1bef109e42ea06cc0450e10cd15550 ports/archives/sqlite-autoconf-3440000.tar.gz
|
11
|
+
:version: "3.44.0"
|
12
12
|
:files:
|
13
|
-
- :url: "https://sqlite.org/2023/sqlite-autoconf-
|
14
|
-
:sha256: "
|
13
|
+
- :url: "https://sqlite.org/2023/sqlite-autoconf-3440000.tar.gz"
|
14
|
+
:sha256: "b9cd386e7cd22af6e0d2a0f06d0404951e1bef109e42ea06cc0450e10cd15550"
|
data/ext/sqlite3/extconf.rb
CHANGED
@@ -49,13 +49,18 @@ module Sqlite3
|
|
49
49
|
|
50
50
|
def configure_packaged_libraries
|
51
51
|
minimal_recipe.tap do |recipe|
|
52
|
-
recipe.configure_options += [
|
52
|
+
recipe.configure_options += [
|
53
|
+
"--enable-shared=no",
|
54
|
+
"--enable-static=yes",
|
55
|
+
"--enable-fts5",
|
56
|
+
]
|
53
57
|
ENV.to_h.tap do |env|
|
54
58
|
user_cflags = with_config("sqlite-cflags")
|
55
59
|
more_cflags = [
|
56
60
|
"-fPIC", # needed for linking the static library into a shared library
|
57
61
|
"-O2", # see https://github.com/sparklemotion/sqlite3-ruby/issues/335 for some benchmarks
|
58
62
|
"-fvisibility=hidden", # see https://github.com/rake-compiler/rake-compiler-dock/issues/87
|
63
|
+
"-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1",
|
59
64
|
]
|
60
65
|
env["CFLAGS"] = [user_cflags, env["CFLAGS"], more_cflags].flatten.join(" ")
|
61
66
|
recipe.configure_options += env.select { |k,v| ENV_ALLOWLIST.include?(k) }
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/sqlite3/database.rb
CHANGED
@@ -18,7 +18,7 @@ module SQLite3
|
|
18
18
|
# end
|
19
19
|
# end
|
20
20
|
#
|
21
|
-
# It wraps the lower-level methods
|
21
|
+
# It wraps the lower-level methods provided by the selected driver, and
|
22
22
|
# includes the Pragmas module for access to various pragma convenience
|
23
23
|
# methods.
|
24
24
|
#
|
@@ -39,7 +39,22 @@ module SQLite3
|
|
39
39
|
|
40
40
|
class << self
|
41
41
|
|
42
|
-
|
42
|
+
# Without block works exactly as new.
|
43
|
+
# With block, like new closes the database at the end, but unlike new
|
44
|
+
# returns the result of the block instead of the database instance.
|
45
|
+
def open( *args )
|
46
|
+
database = new(*args)
|
47
|
+
|
48
|
+
if block_given?
|
49
|
+
begin
|
50
|
+
yield database
|
51
|
+
ensure
|
52
|
+
database.close
|
53
|
+
end
|
54
|
+
else
|
55
|
+
database
|
56
|
+
end
|
57
|
+
end
|
43
58
|
|
44
59
|
# Quotes the given string, making it safe to use in an SQL statement.
|
45
60
|
# It replaces all instances of the single-quote character with two
|
data/lib/sqlite3/version.rb
CHANGED
data/test/test_database.rb
CHANGED
@@ -198,11 +198,25 @@ module SQLite3
|
|
198
198
|
|
199
199
|
def test_new
|
200
200
|
db = SQLite3::Database.new(':memory:')
|
201
|
-
|
201
|
+
assert_instance_of(SQLite3::Database, db)
|
202
202
|
ensure
|
203
203
|
db.close if db
|
204
204
|
end
|
205
205
|
|
206
|
+
def test_open
|
207
|
+
db = SQLite3::Database.open(':memory:')
|
208
|
+
assert_instance_of(SQLite3::Database, db)
|
209
|
+
ensure
|
210
|
+
db.close if db
|
211
|
+
end
|
212
|
+
|
213
|
+
def test_open_returns_block_result
|
214
|
+
result = SQLite3::Database.open(':memory:') do |db|
|
215
|
+
:foo
|
216
|
+
end
|
217
|
+
assert_equal :foo, result
|
218
|
+
end
|
219
|
+
|
206
220
|
def test_new_yields_self
|
207
221
|
thing = nil
|
208
222
|
SQLite3::Database.new(':memory:') do |db|
|
@@ -211,6 +225,14 @@ module SQLite3
|
|
211
225
|
assert_instance_of(SQLite3::Database, thing)
|
212
226
|
end
|
213
227
|
|
228
|
+
def test_open_yields_self
|
229
|
+
thing = nil
|
230
|
+
SQLite3::Database.open(':memory:') do |db|
|
231
|
+
thing = db
|
232
|
+
end
|
233
|
+
assert_instance_of(SQLite3::Database, thing)
|
234
|
+
end
|
235
|
+
|
214
236
|
def test_new_with_options
|
215
237
|
# determine if Ruby is running on Big Endian platform
|
216
238
|
utf16 = ([1].pack("I") == [1].pack("N")) ? "UTF-16BE" : "UTF-16LE"
|
@@ -221,7 +243,7 @@ module SQLite3
|
|
221
243
|
db = SQLite3::Database.new(Iconv.conv(utf16, 'UTF-8', ':memory:'),
|
222
244
|
:utf16 => true)
|
223
245
|
end
|
224
|
-
|
246
|
+
assert_instance_of(SQLite3::Database, db)
|
225
247
|
ensure
|
226
248
|
db.close if db
|
227
249
|
end
|
@@ -241,6 +263,15 @@ module SQLite3
|
|
241
263
|
assert thing.closed?
|
242
264
|
end
|
243
265
|
|
266
|
+
def test_open_with_block_closes_self
|
267
|
+
thing = nil
|
268
|
+
SQLite3::Database.open(':memory:') do |db|
|
269
|
+
thing = db
|
270
|
+
assert !thing.closed?
|
271
|
+
end
|
272
|
+
assert thing.closed?
|
273
|
+
end
|
274
|
+
|
244
275
|
def test_block_closes_self_even_raised
|
245
276
|
thing = nil
|
246
277
|
begin
|
@@ -253,6 +284,18 @@ module SQLite3
|
|
253
284
|
assert thing.closed?
|
254
285
|
end
|
255
286
|
|
287
|
+
def test_open_with_block_closes_self_even_raised
|
288
|
+
thing = nil
|
289
|
+
begin
|
290
|
+
SQLite3::Database.open(':memory:') do |db|
|
291
|
+
thing = db
|
292
|
+
raise
|
293
|
+
end
|
294
|
+
rescue
|
295
|
+
end
|
296
|
+
assert thing.closed?
|
297
|
+
end
|
298
|
+
|
256
299
|
def test_prepare
|
257
300
|
db = SQLite3::Database.new(':memory:')
|
258
301
|
stmt = db.prepare('select "hello world"')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlite3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.8
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2023-
|
14
|
+
date: 2023-11-01 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: |
|
17
17
|
Ruby library to interface with the SQLite3 database engine (http://www.sqlite.org). Precompiled
|