1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Make the shell aware of SQLITE_OMIT_MEMORYDB. Ticket #1395. (CVS 2640)

FossilOrigin-Name: 71a71cef5b3c97744322ceceb48ac3055512c987
This commit is contained in:
drh
2005-08-29 23:06:23 +00:00
parent 19e2d37f1d
commit 01b4171e57
3 changed files with 15 additions and 8 deletions

View File

@@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.124 2005/08/27 01:50:54 drh Exp $
** $Id: shell.c,v 1.125 2005/08/29 23:06:24 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
@@ -1698,6 +1698,13 @@ int main(int argc, char **argv){
}
data.out = stdout;
#ifdef SQLITE_OMIT_MEMORYDB
if( data.zDbFilename==0 ){
fprintf(stderr,"%s: no database filename specified\n", argv[0]);
exit(1);
}
#endif
/* Go ahead and open the database file if it already exists. If the
** file does not exist, delay opening it. This prevents empty database
** files from being created if a user mistypes the database name argument