1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

sqldiff: if the first db argument does not exist, fail instead of creating an empty db. Resolving that for the second argument is trickier, as discussed in [forum:ec2d429e32 | forum post ec2d429e32].

FossilOrigin-Name: 0547ccf776c6054732437bffb8b2fe2ed5194ef817c2593f8cec4a3e2b749720
This commit is contained in:
stephan
2024-07-12 13:45:15 +00:00
parent 64ef4582c2
commit 74d5faec93
3 changed files with 13 additions and 13 deletions

View File

@@ -31,7 +31,7 @@
** correctly on Windows:
**
** fprintf() -> Wfprintf()
**
**
*/
#if defined(_WIN32)
# include "console_io.h"
@@ -65,7 +65,7 @@ struct GlobalVars {
static void strFree(sqlite3_str *pStr){
sqlite3_free(sqlite3_str_finish(pStr));
}
/*
** Print an error resulting from faulting command-line arguments and
** abort the program.
@@ -1998,7 +1998,7 @@ int main(int argc, char **argv){
if( g.bSchemaOnly && g.bSchemaCompare ){
cmdlineError("The --schema option is useless with --table %s .", zTab);
}
rc = sqlite3_open(zDb1, &g.db);
rc = sqlite3_open_v2(zDb1, &g.db, SQLITE_OPEN_READONLY, 0);
if( rc ){
cmdlineError("cannot open database file \"%s\"", zDb1);
}