databases/sqlite3: Update to 3.40.0

ChangeLog: https://www.sqlite.org/releaselog/3_40_0.html

 * Add support for compiling SQLite to WASM and running it in web browsers.
 * Add the recovery extension that might be able to recover some content from a
   corrupt database file.
 * Query planner enhancements:
 * A new typedef named sqlite3_filename is added and used to represent the name
   of a database file.
 * Add the sqlite3_value_encoding() interface.
 * Security enhancement: SQLITE_DBCONFIG_DEFENSIVE is augmented to prohibit
   changing the schema_version.
 * Enhancements to the PRAGMA integrity_check statement:
 * Enhance the VACUUM INTO statement so that it honors the PRAGMA synchronous
   setting.
 * Enhance the sqlite3_strglob() and sqlite3_strlike() APIs
 * Provide the new SQLITE_MAX_ALLOCATION_SIZE compile-time option for limiting
   the size of memory allocations.
 * Change the algorithm used by SQLite's built-in pseudo-random number
   generator (PRNG) from RC4 to Chacha20.
 * Allow two or more indexes to have the same name as long as they are all in
   separate schemas.
 * Miscellaneous performance optimizations result in about 1% fewer CPU cycles
   used on typical workloads.

PR:		268012
Reported by:	pavelivolkov@gmail.com (maintainer)
This commit is contained in:
Pavel Volkov 2022-11-28 07:45:01 +01:00 committed by Fernando Apesteguía
parent f6cb7e8a3a
commit 5e8b3d783d
8 changed files with 92 additions and 9 deletions

View file

@ -1,6 +1,5 @@
PORTNAME= sqlite3
DISTVERSION= 3.39.3
PORTREVISION= 1
DISTVERSION= 3.40.0
PORTEPOCH= 1
CATEGORIES= databases
MASTER_SITES= https://www.sqlite.org/${_YEAR}/ https://www2.sqlite.org/${_YEAR}/ https://www3.sqlite.org/${_YEAR}/

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1663328999
SHA256 (sqlite-src-3390300.zip) = 18c12f2e1da112421173c85c4f8aed43261272c1b0474aa0759288fd30fab9fc
SIZE (sqlite-src-3390300.zip) = 13404886
TIMESTAMP = 1669461304
SHA256 (sqlite-src-3400000.zip) = 48550828142051293e179ffc6a8520f6fbfd82e1cdca78b93792f766cc89b8e2
SIZE (sqlite-src-3400000.zip) = 13723231

View file

@ -1,11 +1,11 @@
--- Makefile.in.orig 2021-04-11 09:08:25 UTC
--- Makefile.in.orig 2022-11-26 11:17:35 UTC
+++ Makefile.in
@@ -1274,7 +1274,7 @@ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz
@@ -1299,7 +1299,7 @@ tcltest: ./testfixture$(TEXE)
# The veryquick.test TCL tests.
#
tcltest: ./testfixture$(TEXE)
- ./testfixture$(TEXE) $(TOP)/test/veryquick.test $(TESTOPTS)
+ mkdir $(TOP)/testdir && touch $(TOP)/test-out.txt && chown nobody $(TOP)/testdir $(TOP)/test-out.txt && su -m nobody -c "./testfixture$(TEXE) $(TOP)/test/veryquick.test $(TESTOPTS)"
# Minimal testing that runs in less than 3 minutes
#
# Runs all the same tests cases as the "tcltest" target but uses
# the testrunner.tcl script to run them in multiple cores

View file

@ -0,0 +1,13 @@
--- test/e_uri.test.orig 2022-11-27 09:06:46 UTC
+++ test/e_uri.test
@@ -139,8 +139,8 @@ if {$tcl_platform(platform) == "unix"} {
foreach {tn uri error} "
1 {file://localhost[test_pwd /]test.db} {not an error}
2 {file://[test_pwd /]test.db} {not an error}
- 3 {file://x[test_pwd /]test.db} {invalid uri authority: x}
- 4 {file://invalid[test_pwd /]test.db} {invalid uri authority: invalid}
+ 3 {file://x[test_pwd /]test.db} {unable to open database file}
+ 4 {file://invalid[test_pwd /]test.db} {unable to open database file}
" {
do_test 2.$tn {
set DB [sqlite3_open_v2 $uri $flags ""]

View file

@ -0,0 +1,11 @@
--- test/fts3expr4.test.orig 2022-11-27 11:47:17 UTC
+++ test/fts3expr4.test
@@ -50,7 +50,7 @@ do_icu_expr_test 1.7 {a:word} {PHRASE 0 0 word}
# is passed to the tokenizer.
#
do_icu_expr_test 1.7 {a:word} {PHRASE 0 0 word}
-do_icu_expr_test 1.8 {d:word} {PHRASE 3 0 d:word}
+do_icu_expr_test 1.8 {d:word} {AND {AND {PHRASE 3 0 d} {PHRASE 3 0 :}} {PHRASE 3 0 word}}
set sqlite_fts3_enable_parentheses 0

View file

@ -0,0 +1,34 @@
--- test/scanstatus.test.orig 2022-11-27 11:40:24 UTC
+++ test/scanstatus.test
@@ -312,8 +312,8 @@ do_scanstatus_test 5.1.2 {
SELECT count(*) FROM t1 WHERE a IN (SELECT b FROM t1 AS ii)
} {2}
do_scanstatus_test 5.1.2 {
- nLoop 1 nVisit 10 nEst 10.0 zName t1bc
- zExplain {SCAN ii USING COVERING INDEX t1bc}
+ nLoop 1 nVisit 10 nEst 10.0 zName t1
+ zExplain {SCAN ii}
nLoop 1 nVisit 2 nEst 8.0 zName sqlite_autoindex_t1_1
zExplain {SEARCH t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
}
@@ -341,16 +341,16 @@ do_eqp_test 5.4.1 {
SELECT count(*) FROM t1, t2 WHERE y = c;
} {
QUERY PLAN
- |--SCAN t1 USING COVERING INDEX t1bc
+ |--SCAN t1
`--SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)
}
do_execsql_test 5.4.2 {
SELECT count(*) FROM t1, t2 WHERE y = c;
} {200}
do_scanstatus_test 5.4.3 {
- nLoop 1 nVisit 10 nEst 10.0 zName t1bc
- zExplain {SCAN t1 USING COVERING INDEX t1bc}
- nLoop 10 nVisit 200 nEst 56.0 zName t2xy
+ nLoop 1 nVisit 10 nEst 10.0 zName t1
+ zExplain {SCAN t1}
+ nLoop 10 nVisit 200 nEst 56.0 zName t2xy
zExplain {SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
}

View file

@ -0,0 +1,11 @@
--- test/stat.test.orig 2022-11-27 11:50:01 UTC
+++ test/stat.test
@@ -140,7 +140,7 @@ do_execsql_test stat-2.1agg {
SELECT * FROM dbstat WHERE aggregate=TRUE ORDER BY name;
} [list \
sqlite_autoindex_t3_1 {} 5 {} 32 3898 1065 132 {} 5120 \
- sqlite_schema {} 1 {} 2 84 824 49 {} 1024 \
+ sqlite_schema {} 1 {} 2 83 825 49 {} 1024 \
t3 {} 17 {} 47 11188 5815 370 {} 17408 \
]

View file

@ -0,0 +1,15 @@
--- test/uri.test.orig 2022-11-27 09:14:11 UTC
+++ test/uri.test
@@ -301,9 +301,9 @@ foreach {tn uri res} {
1 "file://localhost/PWD/test.db" {not an error}
2 "file:///PWD/test.db" {not an error}
3 "file:/PWD/test.db" {not an error}
- 4 "file://l%6Fcalhost/PWD/test.db" {invalid uri authority: l%6Fcalhost}
- 5 "file://lbcalhost/PWD/test.db" {invalid uri authority: lbcalhost}
- 6 "file://x/PWD/test.db" {invalid uri authority: x}
+ 4 "file://l%6Fcalhost/PWD/test.db" {unable to open database file}
+ 5 "file://lbcalhost/PWD/test.db" {unable to open database file}
+ 6 "file://x/PWD/test.db" {unable to open database file}
} {
if {$tcl_platform(platform)=="windows"} {