diff options
author | drh <> | 2024-09-21 15:57:06 +0000 |
---|---|---|
committer | drh <> | 2024-09-21 15:57:06 +0000 |
commit | 38f2c5f81ca05e79554bcc9fa7de5f159ee36602 (patch) | |
tree | 31860707723a7493343471fd1c2321d8bc18cc65 /src/main.c | |
parent | 8a894cd8043c3ddd48b79517035a4fc21e339448 (diff) | |
download | sqlite-38f2c5f81ca05e79554bcc9fa7de5f159ee36602.tar.gz sqlite-38f2c5f81ca05e79554bcc9fa7de5f159ee36602.zip |
If the database filename pointer passed to sqlite3_open(), change it
into ":memory:".
FossilOrigin-Name: 62e11a3a78edf9853b74d6495ccd8ae9ac1966c7d78eb3682cf2d5885e3740ec
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index ac08eea04..6ab09c556 100644 --- a/src/main.c +++ b/src/main.c @@ -3482,6 +3482,7 @@ static int openDatabase( if( ((1<<(flags&7)) & 0x46)==0 ){ rc = SQLITE_MISUSE_BKPT; /* IMP: R-18321-05872 */ }else{ + if( zFilename==0 ) zFilename = ":memory:"; rc = sqlite3ParseUri(zVfs, zFilename, &flags, &db->pVfs, &zOpen, &zErrMsg); } if( rc!=SQLITE_OK ){ |