Skip to content

v3.0 upgrade sqlite3 to v3.50.0 #4972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: v3.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ mariadb_client: mariadb-client-library/mariadb_client/libmariadb/libmariadbclien
sqlite3/sqlite3/sqlite3.o:
cd sqlite3 && rm -rf sqlite-amalgamation-*/ || true
cd sqlite3 && tar -zxf sqlite-amalgamation-*.tar.gz
cd sqlite3/sqlite3 && patch -p1 < ../from_unixtime.patch
cd sqlite3/sqlite3 && patch sqlite3.c < ../sqlite3.c-multiplication-overflow.patch

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This line, which applied the sqlite3.c-multiplication-overflow.patch, has been removed. Could you please confirm that the specific multiplication overflow issue addressed by this patch (potentially related to lookaside memory allocation calculations, based on the deleted patch content) is fixed or no longer relevant in SQLite version 3.50.0? Reintroducing such an overflow could lead to correctness or stability issues.

cd sqlite3 && ln -fsT sqlite-amalgamation-*/ sqlite3
cd sqlite3/sqlite3 && patch -p0 < ../from_unixtime.patch
cd sqlite3/sqlite3 && patch -p0 < ../sqlite3_pass_exts.patch
cd sqlite3/sqlite3 && patch -p0 < ../throw.patch
cd sqlite3/sqlite3 && ${CC} ${MYCFLAGS} -fPIC -c -o sqlite3.o sqlite3.c -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_JSON1 -DSQLITE_DLL=1
Expand Down
16 changes: 8 additions & 8 deletions deps/sqlite3/from_unixtime.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- sqlite-amalgamation-3400100/sqlite3.c 2022-12-28 14:26:39.000000000 +0000
+++ sqlite-amalgamation.patch/sqlite3.c 2023-01-10 16:48:54.793689411 +0000
@@ -24926,6 +24926,44 @@
--- sqlite3.c.O 2025-05-29 14:35:06.000000000 +0000
+++ sqlite3.c 2025-05-30 14:53:11.510407512 +0000
@@ -25950,6 +25950,44 @@
}

/*
Expand Down Expand Up @@ -45,11 +45,11 @@
** time( TIMESTRING, MOD, MOD, ...)
**
** Return HH:MM:SS
@@ -25344,6 +25344,7 @@
PURE_DATE(datetime, -1, 0, 0, datetimeFunc ),
PURE_DATE(strftime, -1, 0, 0, strftimeFunc ),
PURE_DATE(timediff, 2, 0, 0, timediffFunc ),
+ DFUNCTION(from_unixtime, -1, 0, 0, from_unixtimeFunc ),
@@ -26516,6 +26554,7 @@
#ifdef SQLITE_DEBUG
PURE_DATE(datedebug, -1, 0, 0, datedebugFunc ),
#endif
+ DFUNCTION(from_unixtime, -1, 0, 0, from_unixtimeFunc ),
DFUNCTION(current_time, 0, 0, 0, ctimeFunc ),
DFUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
DFUNCTION(current_date, 0, 0, 0, cdateFunc ),
Binary file removed deps/sqlite3/sqlite-amalgamation-3430200.tar.gz
Binary file not shown.
Binary file added deps/sqlite3/sqlite-amalgamation-3500000.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion deps/sqlite3/sqlite3
13 changes: 0 additions & 13 deletions deps/sqlite3/sqlite3.c-multiplication-overflow.patch

This file was deleted.

4 changes: 2 additions & 2 deletions deps/sqlite3/sqlite3_pass_exts.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- sqlite3.c 2024-03-22 19:22:47.046093173 +0100
+++ sqlite3-pass-exts.c 2024-03-22 19:24:09.557303716 +0100
@@ -25168,6 +25168,183 @@
@@ -26309,6 +26309,183 @@
sqlite3ResultStrAccum(context, &sRes);
}

Expand Down Expand Up @@ -184,7 +184,7 @@
/*
** current_time()
**
@@ -129263,6 +129440,9 @@
@@ -133198,6 +133198,9 @@
FUNCTION(substr, 3, 0, 0, substrFunc ),
FUNCTION(substring, 2, 0, 0, substrFunc ),
FUNCTION(substring, 3, 0, 0, substrFunc ),
Expand Down
4 changes: 2 additions & 2 deletions deps/sqlite3/throw.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- sqlite3.c.orig 2024-04-04 15:53:48.801105000 +0000
+++ sqlite3.c 2024-04-04 15:54:51.423876000 +0000
@@ -25175,7 +25175,7 @@
@@ -26316,7 +26316,7 @@
////////////////////////////////////////////////////////////////////////////////

// ctype.h
-extern int toupper (int __c) __THROW;
+extern int toupper (int __c);
+//extern int toupper (int __c) __THROW;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The patch for toupper declaration has changed from removing __THROW (i.e., extern int toupper (int __c);) to commenting out the entire original line (//extern int toupper (int __c) __THROW;).

Is this change to comment out the extern toupper declaration intentional? Does sqlite3.c version 3.50.0 now handle the toupper declaration internally (e.g., via <ctype.h> inclusion) making this explicit extern declaration problematic or unnecessary?


// SHA256_crypt
char * sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen);
Loading