https://bugs.kde.org/show_bug.cgi?id=526569
Bug ID: 526569
Summary: Version 26.X.XBETA
Classification: Applications
Product: skrooge
Version First unspecified
Reported In:
Platform: Other
OS: Other
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: 25.1.0
Product: Skrooge
Title: Windows nightly build 1504: "near "(": syntax error" on operationbalance
INSERT – bundled SQLCipher embeds SQLite 3.20.1 (no window functions)
BACKGROUND
I was using Skrooge 2.31.0 on Linux Mint inside VirtualBox, and I am now trying
to move to Windows 11 with the native nightly build. The account balance is
recalculated correctly in the Windows build, but errors are displayed when
opening a document and when duplicating a transaction.
SUMMARY
The Windows nightly build (skrooge-master-1504-windows-gcc-x86_64.exe, version
26.x beta) shows an SQL syntax error when opening a document and when
duplicating a transaction. The query uses window functions, which require
SQLite >= 3.25.0. The SQLCipher library bundled in this build embeds SQLite
3.20.1.
STEPS TO REPRODUCE
1. Install the Windows nightly build skrooge-master-1504-windows-gcc-x86_64.exe
from cdn.kde.org/ci-builds/office/skrooge/master/windows/
2. Open an existing .skg document [or create a new one].
3. Duplicate a transaction.
ACTUAL RESULT
On opening:
[ERR-10001]: near "(": syntax error Unable to execute the statement
[ERR-10001]: INSERT INTO operationbalance
(r_operation_id,f_balance,f_balance_entered) SELECT id, SUM(f_CURRENTAMOUNT)
OVER (PARTITION BY rd_account_id ORDER BY d_date, id ROWS BETWEEN UNBOUNDED
PRECEDING AND CURRENT ROW) AS f_balance, SUM(f_QUANTITY) OVER (PARTITION BY
rd_account_id ORDER BY d_date, id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT
ROW) AS f_balance_entered FROM v_operation WHERE t_template = 'N';
On duplicating a transaction:
[ERR-5]: Transaction duplication failed
(followed by the same ERR-10001 messages). The duplicated transaction is
nevertheless created.
The account balance is nevertheless recalculated correctly.
ANALYSIS
- The process loads libsqlcipher-0.dll and sqldrivers\libskgsqlcipher.dll
(checked with (Get-Process -Id <pid>).Modules). No libsqlite.dll or qsqlite.dll
is loaded.
- libsqlcipher-0.dll contains the SQLite source id "2017-08-24 16:21:36
8d3a7ea6c5690d6b7c3767558f4f01b511c55463e3f9e64506801fe9b74dce34" and the
string "3.20.1".
- Window functions (SUM() OVER (...)) were introduced in SQLite 3.25.0 (2018),
so this SQLCipher cannot run the query.
- For comparison, libsqlite.dll in the same bin folder is SQLite 3.50.4, and
the bundled sqlite3.exe executes
select sum(1) over (partition by 1 order by 1 rows between unbounded
preceding and current row);
without error (PRAGMA compile_options shows no OMIT_WINDOWFUNC). But Skrooge
does not use this library.
EXPECTED RESULT
No SQL error; SQLCipher built against SQLite >= 3.25.
ENVIRONMENT
- Skrooge: Windows nightly build 1504, version 26.x beta
- OS: Windows 11 [version]
- Previous setup: Skrooge 2.31.0 on Linux Mint (VirtualBox), no such error
--
You are receiving this mail because:
You are watching all bug changes.