Merge 'cli: Fix dump compatibility in "PRAGMA foreign_keys"' from Pekka Enberg

SQLite emits a semicolon after "PRAGMA foreign_keys=OFF" so let's do th
same.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2961
This commit is contained in:
Pekka Enberg
2025-09-08 16:56:01 +03:00
committed by GitHub

View File

@@ -1373,7 +1373,7 @@ impl Limbo {
// FIXME: we don't yet support PRAGMA foreign_keys=OFF internally,
// so for now this hacky boolean that decides not to emit it when cloning
if fk {
writeln!(out, "PRAGMA foreign_keys=OFF")?;
writeln!(out, "PRAGMA foreign_keys=OFF;")?;
}
writeln!(out, "BEGIN TRANSACTION;")?;
// FIXME: At this point, SQLite executes the following: