mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Added the 34to35.html document describing the changes between 3.4.2 and
3.5.0. Minor interface cleanups. (CVS 4302) FossilOrigin-Name: 0791f917bb18d7305b805b9cbcb308bdd7b3a1f5
This commit is contained in:
@@ -2463,7 +2463,7 @@ static int unixAccess(sqlite3_vfs *pVfs, const char *zPath, int flags){
|
||||
case SQLITE_ACCESS_READWRITE:
|
||||
amode = W_OK|R_OK;
|
||||
break;
|
||||
case SQLITE_ACCESS_READONLY:
|
||||
case SQLITE_ACCESS_READ:
|
||||
amode = R_OK;
|
||||
break;
|
||||
|
||||
|
||||
@@ -1237,15 +1237,13 @@ static int winAccess(
|
||||
}
|
||||
free(zConverted);
|
||||
switch( flags ){
|
||||
case SQLITE_ACCESS_READ:
|
||||
case SQLITE_ACCESS_EXISTS:
|
||||
rc = attr!=0xffffffff;
|
||||
break;
|
||||
case SQLITE_ACCESS_READWRITE:
|
||||
rc = (attr & FILE_ATTRIBUTE_READONLY)==0;
|
||||
break;
|
||||
case SQLITE_ACCESS_READONLY:
|
||||
rc = (attr!=0xffffffff) && ((attr & FILE_ATTRIBUTE_READONLY)==1);
|
||||
break;
|
||||
default:
|
||||
assert(!"Invalid flags argument");
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
** the version number) and changes its name to "sqlite3.h" as
|
||||
** part of the build process.
|
||||
**
|
||||
** @(#) $Id: sqlite.h.in,v 1.243 2007/08/27 17:27:49 danielk1977 Exp $
|
||||
** @(#) $Id: sqlite.h.in,v 1.244 2007/08/27 21:10:36 drh Exp $
|
||||
*/
|
||||
#ifndef _SQLITE3_H_
|
||||
#define _SQLITE3_H_
|
||||
@@ -553,7 +553,7 @@ typedef struct sqlite3_mutex sqlite3_mutex;
|
||||
** SQLite will guarantee that the zFilename string passed to
|
||||
** xOpen() is a full pathname as generated by xFullPathname() and
|
||||
** that the string will be valid and unchanged until xClose() is
|
||||
** called. So the sqlite3_file can store a pointer to the
|
||||
** called. So the [sqlite3_file] can store a pointer to the
|
||||
** filename if it needs to remember the filename for some reason.
|
||||
**
|
||||
** The flags argument to xOpen() is a copy of the flags argument
|
||||
@@ -599,10 +599,10 @@ typedef struct sqlite3_mutex sqlite3_mutex;
|
||||
** for exclusive access. This flag is set for all files except
|
||||
** for the main database file.
|
||||
**
|
||||
** The sqlite3_file structure passed as the third argument to
|
||||
** xOpen is allocated by the caller. xOpen just fills it in. The
|
||||
** caller allocates a minimum of szOsFile bytes for the sqlite3_file
|
||||
** structure.
|
||||
** Space to hold the [sqlite3_file] structure passed as the third
|
||||
** argument to xOpen is allocated by caller (the SQLite core).
|
||||
** szOsFile bytes are allocated for this object. The xOpen method
|
||||
** fills in the allocated space.
|
||||
**
|
||||
** The flags argument to xAccess() may be 0 (to test for the
|
||||
** existance of a file) or SQLITE_ACCESS_READWRITE to test to see
|
||||
@@ -649,9 +649,21 @@ struct sqlite3_vfs {
|
||||
** value will increment whenever this happens. */
|
||||
};
|
||||
|
||||
/*
|
||||
** CAPI3REF: Flags for the xAccess VFS method
|
||||
**
|
||||
** These integer constants can be used as the third parameter to
|
||||
** the xAccess method of an [sqlite3_vfs] object. They determine
|
||||
** the kind of what kind of permissions the xAccess method is
|
||||
** looking for. With SQLITE_ACCESS_EXISTS, the xAccess method
|
||||
** simply checks to see if the file exists. With SQLITE_ACCESS_READWRITE,
|
||||
** the xAccess method checks to see if the file is both readable
|
||||
** and writable. With SQLITE_ACCESS_READ the xAccess method
|
||||
** checks to see if the file is readable.
|
||||
*/
|
||||
#define SQLITE_ACCESS_EXISTS 0
|
||||
#define SQLITE_ACCESS_READWRITE 1
|
||||
#define SQLITE_ACCESS_READONLY 2
|
||||
#define SQLITE_ACCESS_READ 2
|
||||
|
||||
/*
|
||||
** CAPI3REF: Enable Or Disable Extended Result Codes
|
||||
|
||||
@@ -726,7 +726,7 @@ static int asyncAccess(sqlite3_vfs *pAsyncVfs, const char *zName, int flags){
|
||||
sqlite3_vfs *pVfs = (sqlite3_vfs *)pAsyncVfs->pAppData;
|
||||
|
||||
assert(flags==SQLITE_ACCESS_READWRITE
|
||||
|| flags==SQLITE_ACCESS_READONLY
|
||||
|| flags==SQLITE_ACCESS_READ
|
||||
|| flags==SQLITE_ACCESS_EXISTS
|
||||
);
|
||||
|
||||
@@ -745,7 +745,7 @@ static int asyncAccess(sqlite3_vfs *pAsyncVfs, const char *zName, int flags){
|
||||
}
|
||||
ASYNC_TRACE(("ACCESS(%s): %s = %d\n",
|
||||
flags==SQLITE_ACCESS_READWRITE?"read-write":
|
||||
flags==SQLITE_ACCESS_READONLY?"read-only":"exists"
|
||||
flags==SQLITE_ACCESS_READ?"read":"exists"
|
||||
, zName, ret)
|
||||
);
|
||||
pthread_mutex_unlock(&async.queueMutex);
|
||||
|
||||
Reference in New Issue
Block a user