1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Return SQLITE_MISUSE from the sqlite3_open_v2() function if the 3rd parameter

is not a valid set of bit-values.

FossilOrigin-Name: 3c926ce0976e765b4c51fcd81d251268ff21a741
This commit is contained in:
drh
2011-05-07 18:18:33 +00:00
parent 522c26fbfb
commit 5dd72ad6df
3 changed files with 8 additions and 8 deletions

View File

@@ -2056,7 +2056,7 @@ static int openDatabase(
testcase( (1<<(flags&7))==0x02 ); /* READONLY */
testcase( (1<<(flags&7))==0x04 ); /* READWRITE */
testcase( (1<<(flags&7))==0x40 ); /* READWRITE | CREATE */
if( ((1<<(flags&7)) & 0x46)==0 ) rc = SQLITE_MISUSE;
if( ((1<<(flags&7)) & 0x46)==0 ) return SQLITE_MISUSE_BKPT;
if( sqlite3GlobalConfig.bCoreMutex==0 ){
isThreadsafe = 0;