From: Trevor D. (Twylite) <tw...@cr...> - 2022-08-19 14:58:13
|
Hi, I'm in the process of upgrading Sqlite3 in an application with an older (Tcl 8.6.2 circa 2014) runtime, and I've run into an issue with tdbc::sqlite3. What I'm seeing is that `nextlist` always gives an empty row. Digging through the source (sqlite3-1.0.1.tm) it looks like the problem is that `${-db} trace [namespace code {my RecordStatement}]` is not firing, so `-needcolumns` never gets set, `columns` never gets added to `-results`, and eventually `nextlist` has no columns to iterate over so it returns an empty list. The root cause appears to be that shortly after sqlite_trace_v2() was added in Sqlite 3.14, the DbTraceHandler used by the old sqlite_trace() was marked deprecated (see https://sqlite.org/src/annotate?filename=src/tclsqlite.c&checkin=trunk), and thus `${-db} trace` is no longer supported by the Sqlite Amalgamation. According to https://core.tcl-lang.org/tdbcsqlite3/finfo?name=library/tdbcsqlite3.tcl the latest tdbc::sqlite3 still uses `${-db} trace` instead of `trace_v2`. I don't see any related tickets at https://core.tcl-lang.org/tdbcsqlite3/ticket. Have I missed something here, or is everyone (who is using tdbc::sqlite3) using it with an older Sqlite (< 3.14) or a custom (not Amalgamation) build? Kind regards, Trevor |