diff options
author | drh <> | 2021-10-13 14:45:35 +0000 |
---|---|---|
committer | drh <> | 2021-10-13 14:45:35 +0000 |
commit | f6d07c83fcc2f5f904e900da6f9cac9a690d8cd6 (patch) | |
tree | 40def1f413b00dabbb55a78f217a4126904fa2fa /src | |
parent | febf0352cd53900849289db9beca69e25de8b981 (diff) | |
download | sqlite-f6d07c83fcc2f5f904e900da6f9cac9a690d8cd6.tar.gz sqlite-f6d07c83fcc2f5f904e900da6f9cac9a690d8cd6.zip |
Back out the SQLITE_OPEN_EXCLUSIVE changes because it does not work on
Windows and it does not work always on unix.
FossilOrigin-Name: d008ad793dfb11c287f366377cbc561acedef6c9d08b1557f463484eda41a84e
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 1 | ||||
-rw-r--r-- | src/os_unix.c | 2 | ||||
-rw-r--r-- | src/shell.c.in | 2 | ||||
-rw-r--r-- | src/sqlite.h.in | 7 |
4 files changed, 1 insertions, 11 deletions
diff --git a/src/main.c b/src/main.c index ade9bd0d9..bf33b640b 100644 --- a/src/main.c +++ b/src/main.c @@ -3161,6 +3161,7 @@ static int openDatabase( ** off all other flags. */ flags &= ~( SQLITE_OPEN_DELETEONCLOSE | + SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_TRANSIENT_DB | diff --git a/src/os_unix.c b/src/os_unix.c index aa6b3b8e4..d45fdabab 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -6185,8 +6185,6 @@ static int unixOpen( /* If unable to create a journal because the directory is not ** writable, change the error code to indicate that. */ rc = SQLITE_READONLY_DIRECTORY; - }else if( errno==EEXIST ){ - rc = SQLITE_CANTOPEN_EXISTS; }else if( errno!=EISDIR && isReadWrite ){ /* Failed to open the file for read/write access. Try read-only. */ flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE); diff --git a/src/shell.c.in b/src/shell.c.in index b33d6155e..27dbe9895 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -8904,8 +8904,6 @@ static int do_meta_command(char *zLine, ShellState *p){ p->openMode = SHELL_OPEN_READONLY; }else if( optionMatch(z, "nofollow") ){ p->openFlags |= SQLITE_OPEN_NOFOLLOW; - }else if( optionMatch(z, "excl") ){ - p->openFlags |= SQLITE_OPEN_EXCLUSIVE; #ifndef SQLITE_OMIT_DESERIALIZE }else if( optionMatch(z, "deserialize") ){ p->openMode = SHELL_OPEN_DESERIALIZE; diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 6fab852b6..84f9e6fdb 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -539,7 +539,6 @@ int sqlite3_exec( #define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8)) #define SQLITE_CANTOPEN_DIRTYWAL (SQLITE_CANTOPEN | (5<<8)) /* Not Used */ #define SQLITE_CANTOPEN_SYMLINK (SQLITE_CANTOPEN | (6<<8)) -#define SQLITE_CANTOPEN_EXISTS (SQLITE_CANTOPEN | (7<<8)) #define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8)) #define SQLITE_CORRUPT_SEQUENCE (SQLITE_CORRUPT | (2<<8)) #define SQLITE_CORRUPT_INDEX (SQLITE_CORRUPT | (3<<8)) @@ -3419,12 +3418,6 @@ void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); ** ** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> ** <dd>The database filename is not allowed to be a symbolic link</dd> -** -** [[OPEN_EXCLUSIVE]] ^(<dt>[SQLITE_OPEN_EXCLUSIVE]</dt> -** <dd>This flag causes the open to fail if the database file already -** exists. The open will only be success if this flag is used in combination -** with the SQLITE_OPEN_CREATE and SQLITE_OPEN_READWRITE flags and if -** the file does not previously exist.</dd> ** </dl>)^ ** ** If the 3rd parameter to sqlite3_open_v2() is not one of the |