1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Automatically turn off DEFENSIVE mode in the shell tool when executing scripts generated by the ".dump" command against an empty database. Add a warning to the top of generated ".dump" scripts that populate virtual tables.

FossilOrigin-Name: 6e9e96b7e7afb9420110f4b93d10b945c9eadfde5e9c81e59ae9ee8167e75707
This commit is contained in:
dan
2024-01-08 18:46:34 +00:00
parent 3e2ffbd476
commit 7cda91c33e
5 changed files with 256 additions and 21 deletions

View File

@ -884,6 +884,15 @@ proc catchcmd {db {cmd ""}} {
set rc [catch { eval $line } msg]
list $rc $msg
}
proc catchsafecmd {db {cmd ""}} {
global CLI
set out [open cmds.txt w]
puts $out $cmd
close $out
set line "exec $CLI -safe $db < cmds.txt"
set rc [catch { eval $line } msg]
list $rc $msg
}
proc catchcmdex {db {cmd ""}} {
global CLI