SQLite

Check-in [1602f6b536]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change the xGetLastError() method on the windows VFS so that it continues to format an error message (if requested) but returns the system error code, rather than an SQLite status code.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | sqlite_system_errno
Files: files | file ages | folders
SHA1: 1602f6b53698bd3a1a4be218c2e3145dd895f1f1
User & Date: drh 2016-03-17 19:28:19.609
Context
2016-03-21
10:49
Merge updates from trunk. (check-in: 86ab864396 user: drh tags: sqlite_system_errno)
2016-03-17
19:28
Change the xGetLastError() method on the windows VFS so that it continues to format an error message (if requested) but returns the system error code, rather than an SQLite status code. (check-in: 1602f6b536 user: drh tags: sqlite_system_errno)
17:23
Simple test cases for sqlite3_system_errno() (check-in: 185bc8644c user: drh tags: sqlite_system_errno)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/os_win.c.
5580
5581
5582
5583
5584
5585
5586

5587
5588


5589
5590
5591
5592
5593
5594
5595
5580
5581
5582
5583
5584
5585
5586
5587
5588

5589
5590
5591
5592
5593
5594
5595
5596
5597







+

-
+
+







**   }
**
** However if an error message is supplied, it will be incorporated
** by sqlite into the error message available to the user using
** sqlite3_errmsg(), possibly making IO errors easier to debug.
*/
static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
  DWORD e = osGetLastError();
  UNUSED_PARAMETER(pVfs);
  return winGetLastErrorMsg(osGetLastError(), nBuf, zBuf);
  if( nBuf>0 ) winGetLastErrorMsg(e, nBuf, zBuf);
  return e;
}

/*
** Initialize and deinitialize the operating system interface.
*/
int sqlite3_os_init(void){
  static sqlite3_vfs winVfs = {