1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Make sure SQLITE_OPEN_DELETEONCLOSE is ignored by sqlite3_open_v2(). (CVS 4798)

FossilOrigin-Name: 33e26f6adf2ec2ab2e2711a8f86ce4cb11544e61
This commit is contained in:
drh
2008-02-19 15:20:44 +00:00
parent 49e4fd71a4
commit a4267dcc69
3 changed files with 19 additions and 8 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.417 2008/01/31 15:31:02 danielk1977 Exp $
** $Id: main.c,v 1.418 2008/02/19 15:20:44 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -944,6 +944,17 @@ static int openDatabase(
int rc;
CollSeq *pColl;
/* Remove harmful bits from the flags parameter */
flags &= ~( SQLITE_OPEN_DELETEONCLOSE |
SQLITE_OPEN_MAIN_DB |
SQLITE_OPEN_TEMP_DB |
SQLITE_OPEN_TRANSIENT_DB |
SQLITE_OPEN_MAIN_JOURNAL |
SQLITE_OPEN_TEMP_JOURNAL |
SQLITE_OPEN_SUBJOURNAL |
SQLITE_OPEN_MASTER_JOURNAL
);
/* Allocate the sqlite data structure */
db = sqlite3MallocZero( sizeof(sqlite3) );
if( db==0 ) goto opendb_out;