Skip to content

Commit d9b3730

Browse files
committed
SQLite 3.48.0.
1 parent 3bae1d7 commit d9b3730

File tree

11 files changed

+38
-27
lines changed

11 files changed

+38
-27
lines changed

embed/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Embeddable Wasm build of SQLite
22

3-
This folder includes an embeddable Wasm build of SQLite 3.47.2 for use with
3+
This folder includes an embeddable Wasm build of SQLite 3.48.0 for use with
44
[`github.com/ncruces/go-sqlite3`](https://pkg.go.dev/github.com/ncruces/go-sqlite3).
55

66
The following optional features are compiled in:

embed/bcw2/bcw2.wasm

665 Bytes
Binary file not shown.

embed/bcw2/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ mkdir -p build/ext/
1313
cp "$ROOT"/sqlite3/*.[ch] build/
1414
cp "$ROOT"/sqlite3/*.patch build/
1515

16-
# https://sqlite.org/src/info/ec5d7025cba9f4ac
17-
curl -# https://sqlite.org/src/tarball/sqlite.tar.gz?r=ec5d7025 | tar xz
16+
# https://sqlite.org/src/info/fab341c829554573
17+
curl -# https://sqlite.org/src/tarball/sqlite.tar.gz?r=fab341c8 | tar xz
1818

1919
cd sqlite
2020
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
@@ -38,7 +38,7 @@ mv sqlite/ext/misc/spellfix.c build/ext/
3838
mv sqlite/ext/misc/uint.c build/ext/
3939

4040
cd build
41-
cat *.patch | patch --no-backup-if-mismatch
41+
cat *.patch | patch -p0 --no-backup-if-mismatch
4242
cd ~-
4343

4444
"$WASI_SDK/clang" --target=wasm32-wasi -std=c23 -g0 -O2 \

embed/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func Test_init(t *testing.T) {
1919
if err != nil {
2020
t.Fatal(err)
2121
}
22-
if version != "3.47.2" {
22+
if version != "3.48.0" {
2323
t.Error(version)
2424
}
2525
}

embed/sqlite3.wasm

5.17 KB
Binary file not shown.

sqlite3/base64.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- ext/base64.c.orig
2+
+++ ext/base64.c
3+
@@ -198,7 +198,7 @@
4+
deliberate_fall_through; /* FALLTHRU */
5+
case 1:
6+
pOut[0] = (qv>>16) & 0xff;
7+
- deliberate_fall_through; /* FALLTHRU */
8+
+ break; /* FALLTHRU */
9+
}
10+
pOut += nbo;
11+
}

sqlite3/busy_timeout.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# handle, and interrupt, sqlite3_busy_timeout.
33
--- sqlite3.c.orig
44
+++ sqlite3.c
5-
@@ -182928,7 +182928,7 @@
5+
@@ -183054,7 +183054,7 @@
66
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
77
#endif
88
if( ms>0 ){

sqlite3/download.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euo pipefail
33

44
cd -P -- "$(dirname -- "$0")"
55

6-
curl -#OL "https://sqlite.org/2024/sqlite-amalgamation-3470200.zip"
6+
curl -#OL "https://sqlite.org/2025/sqlite-amalgamation-3480000.zip"
77
unzip -d . sqlite-amalgamation-*.zip
88
mv sqlite-amalgamation-*/sqlite3.c .
99
mv sqlite-amalgamation-*/sqlite3.h .
@@ -17,32 +17,32 @@ rm -rf sqlite-amalgamation-*
1717
# mv sqlite-snapshot-*/sqlite3ext.h .
1818
# rm -rf sqlite-snapshot-*
1919

20-
cat *.patch | patch --no-backup-if-mismatch
21-
2220
mkdir -p ext/
2321
cd ext/
24-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/anycollseq.c"
25-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/base64.c"
26-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/decimal.c"
27-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/ieee754.c"
28-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/regexp.c"
29-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/series.c"
30-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/spellfix.c"
31-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/ext/misc/uint.c"
22+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/ext/misc/anycollseq.c"
23+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/ext/misc/base64.c"
24+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/ext/misc/decimal.c"
25+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/ext/misc/ieee754.c"
26+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/ext/misc/regexp.c"
27+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/ext/misc/series.c"
28+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/ext/misc/spellfix.c"
29+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/ext/misc/uint.c"
3230
cd ~-
3331

3432
cd ../vfs/tests/mptest/testdata/
35-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/config01.test"
36-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/config02.test"
37-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/crash01.test"
38-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/crash02.subtest"
39-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/multiwrite01.test"
33+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/mptest/config01.test"
34+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/mptest/config02.test"
35+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/mptest/crash01.test"
36+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/mptest/crash02.subtest"
37+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/mptest/multiwrite01.test"
4038
cd ~-
4139

4240
cd ../vfs/tests/mptest/wasm/
43-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/mptest/mptest.c"
41+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/mptest/mptest.c"
4442
cd ~-
4543

4644
cd ../vfs/tests/speedtest1/wasm/
47-
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.47.2/test/speedtest1.c"
48-
cd ~-
45+
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.48.0/test/speedtest1.c"
46+
cd ~-
47+
48+
cat *.patch | patch -p0 --no-backup-if-mismatch

sqlite3/vfs_find.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Remove VFS registration. Go handles it.
22
--- sqlite3.c.orig
33
+++ sqlite3.c
4-
@@ -26603,7 +26603,7 @@
4+
@@ -26623,7 +26623,7 @@
55
sqlite3_free(p);
66
return sqlite3_os_init();
77
}
@@ -10,7 +10,7 @@
1010
/*
1111
** The list of all registered VFS implementations.
1212
*/
13-
@@ -26700,7 +26700,7 @@
13+
@@ -26720,7 +26720,7 @@
1414
sqlite3_mutex_leave(mutex);
1515
return SQLITE_OK;
1616
}

vfs/tests/mptest/wasm/mptest.wasm

5.08 KB
Binary file not shown.

0 commit comments

Comments
 (0)