By default, the sqlite3 port has the DQS option off. Unfortunately, xmoto uses double-quoting for strings, for example in getXmParameterKey: https://github.com/xmoto/xmoto/blob/v0.6.2/src/db/xmDatabase.cpp#L329 This causes xmoto to crash at startup with either: - "no such column: siteKey" if no existing xmoto DB is present, or - "no such column: xmdb_version" if there is an existing DB This should be reported upstream, I'll look into it. For now, we could patch xmDatabase::open to add `sqlite3_db_config(m_db, SQLITE_DBCONFIG_DQS_DML, 1 NULL);`
PR for upstream: https://github.com/xmoto/xmoto/pull/188
PR submitted against ports repo here: https://github.com/freebsd/freebsd-ports/pull/254
Thank you for looking into this. Could you add your patch against the ports tree (using git-format-patch if possible) to this bug report? This is the preferred way of submitting patches.
Yup, Github has this great feature where if you add ".patch" to the end of a PR URL you get the formatted plain-text version: https://patch-diff.githubusercontent.com/raw/freebsd/freebsd-ports/pull/254.patch This is already against the ports tree.
Created attachment 250324 [details] Fix xmoto DB access For your convenience, I've also attached the patch against the ports tree.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=52371ce420c779e73cd2feb68bd8627508fde655 commit 52371ce420c779e73cd2feb68bd8627508fde655 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2024-05-06 13:07:33 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2024-05-14 01:44:10 +0000 games/xmoto: fix sqlite related startup crash PR: 278669 Submitted by: dave@vasilevsky.ca Upstream PR: https://github.com/xmoto/xmoto/pull/188/files games/xmoto/Makefile | 2 +- games/xmoto/files/patch-src_db_xmDatabase.cpp (new) | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-)