[Bug 278669] games/xmoto: Crashes at startup if DQS option off for sqlite3

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 30 Apr 2024 19:22:09 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278669

            Bug ID: 278669
           Summary: games/xmoto: Crashes at startup if DQS option off for
                    sqlite3
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: amdmi3@FreeBSD.org
          Reporter: dave@vasilevsky.ca
          Assignee: amdmi3@FreeBSD.org
             Flags: maintainer-feedback?(amdmi3@FreeBSD.org)

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);`

-- 
You are receiving this mail because:
You are the assignee for the bug.