From 03f531417c2a0d964625bb194fabc5c200e5b64b Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Tue, 8 Apr 2025 11:12:20 +0200 Subject: [PATCH 1/3] update sqlite download version to 2025 --- .github/shared/install_sqlite/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/shared/install_sqlite/action.yml b/.github/shared/install_sqlite/action.yml index f74f620f1..b7571d72c 100644 --- a/.github/shared/install_sqlite/action.yml +++ b/.github/shared/install_sqlite/action.yml @@ -6,8 +6,8 @@ runs: steps: - name: Install SQLite env: - SQLITE_VERSION: "3470200" - YEAR: 2024 + SQLITE_VERSION: "3490100" + YEAR: 2025 run: | curl -o /tmp/sqlite.zip https://www.sqlite.org/$YEAR/sqlite-tools-linux-x64-$SQLITE_VERSION.zip > /dev/null unzip -j /tmp/sqlite.zip sqlite3 -d /usr/local/bin/ From b83b51e973de0d01dc97a79c0965ab62cdc5de47 Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Tue, 8 Apr 2025 11:16:32 +0200 Subject: [PATCH 2/3] remove www. prefix --- .github/shared/install_sqlite/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/shared/install_sqlite/action.yml b/.github/shared/install_sqlite/action.yml index b7571d72c..533d4e17d 100644 --- a/.github/shared/install_sqlite/action.yml +++ b/.github/shared/install_sqlite/action.yml @@ -9,7 +9,7 @@ runs: SQLITE_VERSION: "3490100" YEAR: 2025 run: | - curl -o /tmp/sqlite.zip https://www.sqlite.org/$YEAR/sqlite-tools-linux-x64-$SQLITE_VERSION.zip > /dev/null + curl -o /tmp/sqlite.zip https://sqlite.org/$YEAR/sqlite-tools-linux-x64-$SQLITE_VERSION.zip > /dev/null unzip -j /tmp/sqlite.zip sqlite3 -d /usr/local/bin/ sqlite3 --version shell: bash From 12ae07874ed48ab3b8f43f8cbbfff869e26b24f1 Mon Sep 17 00:00:00 2001 From: jachewz Date: Tue, 8 Apr 2025 23:23:08 +1000 Subject: [PATCH 3/3] fmt inf float str as "Inf"/"-Inf" --- core/types.rs | 6 ++++++ testing/select.test | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/core/types.rs b/core/types.rs index 1556ee100..72119349f 100644 --- a/core/types.rs +++ b/core/types.rs @@ -197,6 +197,12 @@ impl Display for OwnedValue { } Self::Float(fl) => { let fl = *fl; + if fl == f64::INFINITY { + return write!(f, "Inf"); + } + if fl == f64::NEG_INFINITY { + return write!(f, "-Inf"); + } if fl.is_nan() { return write!(f, ""); } diff --git a/testing/select.test b/testing/select.test index 27741aa54..02236159a 100755 --- a/testing/select.test +++ b/testing/select.test @@ -166,6 +166,14 @@ do_execsql_test select-like-expression { select 2 % 0.5 } {} +do_execsql_test select_positive_infinite_float { + SELECT 1.7976931348623157E+308 + 1e308; -- f64::MAX + 1e308 +} {Inf} + +do_execsql_test select_negative_infinite_float { + SELECT -1.7976931348623157E+308 - 1e308 -- f64::MIN - 1e308 +} {-Inf} + do_execsql_test select_shl_large_negative_float { SELECT 1 << -1e19; SELECT 1 << -9223372036854775808; -- i64::MIN