sqlite_master -> sqlite_schema rename breaks DB dump compatibility
(1) By anonymous on 2021-08-26 15:37:16 [source]
In git commit 067b92ba0088 ("Extend the refactoring into extensions. Clean up stray newlines.", 2020-06-19), which was first released as part of "version-3.33.0", the DUMP command ("ext/misc/dbdump.c", function dump_callback()) was modified as follows: it would now generate an "ANALYZE sqlite_schema" command, rather than the "ANALYZE sqlite_master" command. As a consequence, importing -- executing -- such dumps against earlier sqlite3 releases now fails, because those versions do not know about "sqlite_schema", only "sqlite_master". As a further consequence, the "sqlite_stat1" table is also not created -- it would normally be created by this particular ANALYZE command --, and so the subsequent "INSERT INTO sqlite_stat1" commands in the dump also fail.
(2) By Brian Minton (bjmgeek) on 2021-09-22 22:21:10 in reply to 1 [link] [source]
Is there a way to make the new version of the sqlite shell generate compatible dumps?
(3) By Larry Brasfield (larrybr) on 2021-09-23 01:59:38 in reply to 2 [link] [source]
One perhaps brutal way:
.once |sed -e s/sqlite_schema/sqlite_master/ > archaic_dump
.dump
, which will also alter any text or goofy identifiers containing the modern name for SQLite's schema table. (Maybe that's for the best.)