Remove the unused xRename() method from the sqlite3_vfs object.
Add better documentation on the xCurrentTimeInt64() method. FossilOrigin-Name: 51ec0e5432dd6849b83a3d969a018482eb3bb083
This commit is contained in:
@@ -6084,7 +6084,6 @@ int sqlite3_os_init(void){
|
||||
unixSleep, /* xSleep */ \
|
||||
unixCurrentTime, /* xCurrentTime */ \
|
||||
unixGetLastError, /* xGetLastError */ \
|
||||
0, /* xRename */ \
|
||||
unixCurrentTimeInt64, /* xCurrentTimeInt64 */ \
|
||||
}
|
||||
|
||||
|
||||
@@ -2478,7 +2478,6 @@ int sqlite3_os_init(void){
|
||||
winSleep, /* xSleep */
|
||||
winCurrentTime, /* xCurrentTime */
|
||||
winGetLastError, /* xGetLastError */
|
||||
0, /* xRename */
|
||||
winCurrentTimeInt64, /* xCurrentTimeInt64 */
|
||||
};
|
||||
|
||||
|
||||
+11
-5
@@ -827,16 +827,23 @@ typedef struct sqlite3_mutex sqlite3_mutex;
|
||||
** handled as a fatal error by SQLite, vfs implementations should endeavor
|
||||
** to prevent this by setting mxPathname to a sufficiently large value.
|
||||
**
|
||||
** The xRandomness(), xSleep(), and xCurrentTime() interfaces
|
||||
** are not strictly a part of the filesystem, but they are
|
||||
** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()
|
||||
** interfaces are not strictly a part of the filesystem, but they are
|
||||
** included in the VFS structure for completeness.
|
||||
** The xRandomness() function attempts to return nBytes bytes
|
||||
** of good-quality randomness into zOut. The return value is
|
||||
** the actual number of bytes of randomness obtained.
|
||||
** The xSleep() method causes the calling thread to sleep for at
|
||||
** least the number of microseconds given. The xCurrentTime()
|
||||
** method returns a Julian Day Number for the current date and time.
|
||||
**
|
||||
** method returns a Julian Day Number for the current date and time as
|
||||
** a floating point value.
|
||||
** The xCurrentTimeInt64() method returns, as an integer, the Julian
|
||||
** Day Number multipled by 86400000 (the number of milliseconds in
|
||||
** a 24-hour day).
|
||||
** ^SQLite will use the xCurrentTimeInt64() method to get the current
|
||||
** date and time if that method is available (if iVersion is 2 or
|
||||
** greater and the function pointer is not NULL) and will fall back
|
||||
** to xCurrentTime() if xCurrentTimeInt64() is unavailable.
|
||||
*/
|
||||
typedef struct sqlite3_vfs sqlite3_vfs;
|
||||
struct sqlite3_vfs {
|
||||
@@ -863,7 +870,6 @@ struct sqlite3_vfs {
|
||||
** The methods above are in version 1 of the sqlite_vfs object
|
||||
** definition. Those that follow are added in version 2 or later
|
||||
*/
|
||||
int (*xRename)(sqlite3_vfs*, const char *zOld, const char *zNew, int dirSync);
|
||||
int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
|
||||
/*
|
||||
** The methods above are in versions 1 and 2 of the sqlite_vfs object.
|
||||
|
||||
@@ -813,7 +813,6 @@ static int crashEnableCmd(
|
||||
cfSleep, /* xSleep */
|
||||
cfCurrentTime, /* xCurrentTime */
|
||||
0, /* xGetlastError */
|
||||
0, /* xRename */
|
||||
0, /* xCurrentTimeInt64 */
|
||||
};
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@ static sqlite3_vfs devsym_vfs = {
|
||||
devsymSleep, /* xSleep */
|
||||
devsymCurrentTime, /* xCurrentTime */
|
||||
0, /* xGetLastError */
|
||||
0, /* xRename */
|
||||
0 /* xCurrentTimeInt64 */
|
||||
};
|
||||
|
||||
|
||||
@@ -182,7 +182,6 @@ static sqlite3_vfs jt_vfs = {
|
||||
jtSleep, /* xSleep */
|
||||
jtCurrentTime, /* xCurrentTime */
|
||||
0, /* xGetLastError */
|
||||
0, /* xRename */
|
||||
jtCurrentTimeInt64 /* xCurrentTimeInt64 */
|
||||
};
|
||||
|
||||
|
||||
@@ -199,7 +199,6 @@ static fs_vfs_t fs_vfs = {
|
||||
fsRandomness, /* xRandomness */
|
||||
fsSleep, /* xSleep */
|
||||
fsCurrentTime, /* xCurrentTime */
|
||||
0, /* xRename */
|
||||
0 /* xCurrentTimeInt64 */
|
||||
},
|
||||
0, /* pFileList */
|
||||
|
||||
+1
-6
@@ -22,7 +22,7 @@
|
||||
** overhead introduced into the application by logging.
|
||||
**
|
||||
** All calls on sqlite3_file objects except xFileControl() are logged.
|
||||
** Additionally, calls to the xAccess(), xOpen(), xDelete() and xRename()
|
||||
** Additionally, calls to the xAccess(), xOpen(), and xDelete()
|
||||
** methods are logged. The other sqlite3_vfs object methods (xDlXXX,
|
||||
** xRandomness, xSleep, xCurrentTime, xGetLastError and xCurrentTimeInt64)
|
||||
** are not logged.
|
||||
@@ -171,7 +171,6 @@ static int vfslogSleep(sqlite3_vfs*, int microseconds);
|
||||
static int vfslogCurrentTime(sqlite3_vfs*, double*);
|
||||
|
||||
static int vfslogGetLastError(sqlite3_vfs*, int, char *);
|
||||
static int vfslogRename(sqlite3_vfs*, const char *, const char *, int);
|
||||
static int vfslogCurrentTimeInt64(sqlite3_vfs*, sqlite3_int64*);
|
||||
|
||||
static sqlite3_vfs vfslog_vfs = {
|
||||
@@ -193,7 +192,6 @@ static sqlite3_vfs vfslog_vfs = {
|
||||
vfslogSleep, /* xSleep */
|
||||
vfslogCurrentTime, /* xCurrentTime */
|
||||
vfslogGetLastError, /* xGetLastError */
|
||||
vfslogRename, /* xRename */
|
||||
vfslogCurrentTimeInt64 /* xCurrentTime */
|
||||
};
|
||||
|
||||
@@ -616,9 +614,6 @@ static int vfslogCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){
|
||||
static int vfslogGetLastError(sqlite3_vfs *pVfs, int a, char *b){
|
||||
return REALVFS(pVfs)->xGetLastError(REALVFS(pVfs), a, b);
|
||||
}
|
||||
static int vfslogRename(sqlite3_vfs *pVfs, const char *a, const char *b, int c){
|
||||
return REALVFS(pVfs)->xRename(REALVFS(pVfs), a, b, c);
|
||||
}
|
||||
static int vfslogCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *p){
|
||||
return REALVFS(pVfs)->xCurrentTimeInt64(REALVFS(pVfs), p);
|
||||
}
|
||||
|
||||
+1
-2
@@ -1296,8 +1296,7 @@ static int testvfs_cmd(
|
||||
tvfsSleep, /* xSleep */
|
||||
tvfsCurrentTime, /* xCurrentTime */
|
||||
0, /* xGetLastError */
|
||||
0,
|
||||
0,
|
||||
0, /* xCurrentTimeInt64 */
|
||||
};
|
||||
|
||||
Testvfs *p; /* New object */
|
||||
|
||||
Reference in New Issue
Block a user