From bcb97fe95e5d66750156602a01a1c96f8aa18fbe Mon Sep 17 00:00:00 2001 From: danielk1977 Date: Fri, 6 Jun 2008 15:49:29 +0000 Subject: [PATCH] Add the xGetLastError() member function to the sqlite3_vfs structure. It is neither called nor implemented at this point. (CVS 5192) FossilOrigin-Name: b8f1da52c303de20d40aa20a7a031728d5d69af5 --- manifest | 18 +++++++++--------- manifest.uuid | 2 +- src/os_unix.c | 9 +++++++-- src/os_win.c | 12 ++++++++---- src/sqlite.h.in | 3 ++- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/manifest b/manifest index aee2fce092..a74c840234 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\sthe\ssubroutine\sreturn\sstack\sfrom\sthe\sVDBE.\s\sReturn\saddresses\nfor\ssubroutines\sare\snow\sstored\sin\sregisters.\s(CVS\s5191) -D 2008-06-06T15:04:37 +C Add\sthe\sxGetLastError()\smember\sfunction\sto\sthe\ssqlite3_vfs\sstructure.\sIt\sis\sneither\scalled\snor\simplemented\sat\sthis\spoint.\s(CVS\s5192) +D 2008-06-06T15:49:30 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 F Makefile.in ce92ea8dc7adfb743757794f51c10d1b0d9c55e4 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -131,8 +131,8 @@ F src/os.c 284abcb97ffdaf5f0b08fa4c5fe1fe93dd86b416 F src/os.h 333a53ddaf25697577a58165e1216c6cb3ccf056 F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60 F src/os_os2.c 1578149e21c4eac42c7f230a6f40500846f8e781 -F src/os_unix.c 067a4d5a26a49cc1bdf027cdddbc63a5a2fa13b7 -F src/os_win.c 07df9a6f40028d762db8976961589847be73564e +F src/os_unix.c 47936aee8265e482faa626141d97d896aa981ef4 +F src/os_win.c 0d975b131b2b104d6d69d9f16bdf3c8cec28e81d F src/pager.c b07ae2a2b9800250064ab487ef704a67c7fb5c9d F src/pager.h 7b1de4bf2cf2d9b7b312e6ed5bc7fcc9ba9aa2a4 F src/parse.y 8c2c3145eebe1964eb279cb3c4e502eae28bb0fa @@ -142,7 +142,7 @@ F src/printf.c f2d4f6c5b0ec24b643e85fe60258adad8b1f6acc F src/random.c 2b2db2de4ab491f5a14d3480466f8f4b5a5db74a F src/select.c 669687459e7d0193c89de06c5dbed55b4a41191c F src/shell.c a12ea645271b7876c8f080146f48e20b00d367ec -F src/sqlite.h.in d60f963be07b6961037b1962a09bf172eb9d570f +F src/sqlite.h.in 48d90217674a919cc96cdeb6c26fe674eddfa23a F src/sqlite3ext.h faacd0e6a81aabee0861c6d7883c9172e74ef5b3 F src/sqliteInt.h 1593404d8aee13687ca7b5d552cb153de7441bef F src/sqliteLimit.h f435e728c6b620ef7312814d660a81f9356eb5c8 @@ -591,7 +591,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1 F tool/speedtest8inst1.c c65494ca99d1e09c246dfe37a7ca7a354af9990f -P 5173b3e816c7eb711cd21a9068bbafb9ebb7cff1 -R 45b622f4f2c3d79a7a9794b6b11a4883 -U drh -Z 45ba29cafdd2a7e7669def4206bfdcea +P ef1956eebcaf5aca51af8c3b406b1fd4b1f391a7 +R 7ebcf59d214782c7eac008101f72d887 +U danielk1977 +Z b5f2d46790da62cb14651ece7247fa55 diff --git a/manifest.uuid b/manifest.uuid index b44c03a3c4..0e68ee2465 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ef1956eebcaf5aca51af8c3b406b1fd4b1f391a7 \ No newline at end of file +b8f1da52c303de20d40aa20a7a031728d5d69af5 \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index 13c0ee2571..63e1950ccc 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -12,7 +12,7 @@ ** ** This file contains code that is specific to Unix systems. ** -** $Id: os_unix.c,v 1.185 2008/06/06 11:11:26 danielk1977 Exp $ +** $Id: os_unix.c,v 1.186 2008/06/06 15:49:30 danielk1977 Exp $ */ #include "sqliteInt.h" #if OS_UNIX /* This file is used on unix only */ @@ -2775,6 +2775,10 @@ static int unixCurrentTime(sqlite3_vfs *pVfs, double *prNow){ return 0; } +static int unixGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ + return 0; +} + /* ** Return a pointer to the sqlite3DefaultVfs structure. We use ** a function rather than give the structure global scope because @@ -2800,7 +2804,8 @@ sqlite3_vfs *sqlite3OsDefaultVfs(void){ unixDlClose, /* xDlClose */ unixRandomness, /* xRandomness */ unixSleep, /* xSleep */ - unixCurrentTime /* xCurrentTime */ + unixCurrentTime, /* xCurrentTime */ + unixGetLastError /* xGetLastError */ }; return &unixVfs; diff --git a/src/os_win.c b/src/os_win.c index 9b13628bfa..8f23c67709 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -12,7 +12,7 @@ ** ** This file contains code that is specific to windows. ** -** $Id: os_win.c,v 1.125 2008/06/06 11:11:26 danielk1977 Exp $ +** $Id: os_win.c,v 1.126 2008/06/06 15:49:30 danielk1977 Exp $ */ #include "sqliteInt.h" #if OS_WIN /* This file is used for windows only */ @@ -1548,6 +1548,9 @@ int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){ return 0; } +static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ + return 0; +} /* ** Return a pointer to the sqlite3DefaultVfs structure. We use @@ -1563,7 +1566,7 @@ sqlite3_vfs *sqlite3OsDefaultVfs(void){ 0, /* pNext */ "win32", /* zName */ 0, /* pAppData */ - + winOpen, /* xOpen */ winDelete, /* xDelete */ winAccess, /* xAccess */ @@ -1574,9 +1577,10 @@ sqlite3_vfs *sqlite3OsDefaultVfs(void){ winDlClose, /* xDlClose */ winRandomness, /* xRandomness */ winSleep, /* xSleep */ - winCurrentTime /* xCurrentTime */ + winCurrentTime, /* xCurrentTime */ + winGetLastError /* xGetLastError */ }; - + return &winVfs; } diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 959e9569e9..fda0fe4701 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -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.321 2008/06/06 11:11:26 danielk1977 Exp $ +** @(#) $Id: sqlite.h.in,v 1.322 2008/06/06 15:49:30 danielk1977 Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ @@ -819,6 +819,7 @@ struct sqlite3_vfs { int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); int (*xSleep)(sqlite3_vfs*, int microseconds); int (*xCurrentTime)(sqlite3_vfs*, double*); + int (*xGetLastError)(sqlite3_vfs*, int, char *); /* New fields may be appended in figure versions. The iVersion ** value will increment whenever this happens. */ };