According to https://www.sqlite.org/lang_delete.html, it should be possible to run a query like `delete from mytable order by id limit 1;`, because sqlite is compiled with ENABLE_UPDATE_DELETE_LIMIT flag (which I can verify with a query `PRAGMA compile_options;`), but it results in `Error: near "ORDER": syntax error` instead. Reproducible: Always Steps to Reproduce: 1. Run `sqlite3 :memory:` 2. Execute `create table mytable (id);` 3. Execute `delete from mytable order by id limit 1;` Actual Results: Error: near "ORDER": syntax error Expected Results: no error Confirmed to work on Debian. Independently confirmed to not work on 3 Gentoo Linux systems. Might it be that the flag doesn’t reach the Lemon parser generator as is written at https://www.sqlite.org/compile.html#enable_update_delete_limit ?
That code works for me. Maybe try building dev-db/sqlite with USE="tcl" or USE="test" or USE="tools".
You’re right, building with USE="tools" made it work. I don’t know how big are the benefits of using a different source package when none of those 3 USE flags is used, but if this is to stay, I’d propose not adding ENABLE_UPDATE_DELETE_LIMIT to CPPFLAGS in this case. Then it can be properly detected by applications that the feature is missing.
Yeah it's because gentoo is using the amalgamation source by default, which doesn't even have lemon so as you suspected... Seems it's to make tcl optional, if you build with USE=tcl that statement will work (uses the full source instead). Didn't check if more flags are affected... Debian also builds it that way then provides a separate package for tcl bindings to avoid a runtime dependency (still needed at build time for other reasons). I'd leave this open, it is a bit of a worry that some syntax won't work with no indication from neither the ebuild nor USE description.
Maybe some solution is to add new USE flag, e.g. USE="featureful" or USE="minimal" with inverted meaning and enabled by default. However USE="minimal" would not really mean minimalness and only slightly smaller set of features than all features enabled with USE="-minimal"...
After more thinking, I prefer to enable all features in libsqlite3.so and sqlite3 at least by default, which would mean using Tcl at build time by default. So something like IUSE="+featureful" or IUSE="minimal".
Several extensions are not available in tarball used for non-Tcl build. Backporting of upstream fixes to tarball used for non-Tcl build requires unnecessary manual work. Therefore support for non-Tcl build will be dropped.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f797e0fd4092a1d9e83c23005806a2db3d7bd0c2 commit f797e0fd4092a1d9e83c23005806a2db3d7bd0c2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2020-07-02 13:54:37 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-07-04 13:52:28 +0000 dev-db/sqlite: Drop support for non-Tcl build. Closes: https://bugs.gentoo.org/724578 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Mike Gilbert <floppym@gentoo.org> dev-db/sqlite/Manifest | 1 - dev-db/sqlite/sqlite-3.32.3.ebuild | 94 ++++++++------------------------------ 2 files changed, 20 insertions(+), 75 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2b164ba52c04ff6fb7b8879d35f0f08ee01aed9 commit b2b164ba52c04ff6fb7b8879d35f0f08ee01aed9 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2021-03-29 01:00:00 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-03-29 17:42:35 +0000 dev-db/sqlite: Fix Tcl dependency and detection. Fixes: f797e0fd4092a1d9e83c23005806a2db3d7bd0c2 Bug: https://bugs.gentoo.org/724578 Closes: https://bugs.gentoo.org/773967 Closes: https://github.com/gentoo/gentoo/pull/19972 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Mike Gilbert <floppym@gentoo.org> dev-db/sqlite/sqlite-3.33.0.ebuild | 11 +++++++++-- dev-db/sqlite/sqlite-3.34.0.ebuild | 11 +++++++++-- dev-db/sqlite/sqlite-3.34.1.ebuild | 11 +++++++++-- dev-db/sqlite/sqlite-3.35.0.ebuild | 11 +++++++++-- dev-db/sqlite/sqlite-3.35.1.ebuild | 11 +++++++++-- dev-db/sqlite/sqlite-3.35.2.ebuild | 11 +++++++++-- dev-db/sqlite/sqlite-3.35.3.ebuild | 11 +++++++++-- 7 files changed, 63 insertions(+), 14 deletions(-)