From 84d996f949a66a0a18a42e9fda1813bdd72f43d3 Mon Sep 17 00:00:00 2001 From: Andy Lindeman Date: Wed, 24 Dec 2025 13:29:17 -0500 Subject: [PATCH] Compile sqlite with SQLITE_ENABLE_UPDATE_DELETE_LIMIT This option enables an optional ORDER BY and LIMIT clause on UPDATE and DELETE statements: https://sqlite.org/compile.html#enable_update_delete_limit It is enabled by default in the Debian sqlite3 package: https://sources.debian.org/src/sqlite3/3.46.1-8/debian/rules#L51 --- cpython-unix/build-sqlite.sh | 1 + cpython-windows/build.py | 1 + 2 files changed, 2 insertions(+) diff --git a/cpython-unix/build-sqlite.sh b/cpython-unix/build-sqlite.sh index d39c6bda..fc4013f4 100755 --- a/cpython-unix/build-sqlite.sh +++ b/cpython-unix/build-sqlite.sh @@ -31,6 +31,7 @@ CFLAGS="${EXTRA_TARGET_CFLAGS} \ -DSQLITE_ENABLE_FTS5 \ -DSQLITE_ENABLE_GEOPOLY \ -DSQLITE_ENABLE_RTREE \ + -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \ -fPIC" \ CPPFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC" \ LDFLAGS="${EXTRA_TARGET_LDFLAGS}" ./configure ${CONFIGURE_FLAGS} diff --git a/cpython-windows/build.py b/cpython-windows/build.py index d0c39701..60847a60 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -577,6 +577,7 @@ def hack_project_files( b"SQLITE_ENABLE_FTS5", b"SQLITE_ENABLE_GEOPOLY", b"SQLITE_ENABLE_RTREE", + b"SQLITE_ENABLE_UPDATE_DELETE_LIMIT", } with sqlite3_path.open("rb") as fh: data = fh.read()