diff options
author | James Turner <jturner@cvs.openbsd.org> | 2014-09-29 22:56:14 +0000 |
---|---|---|
committer | James Turner <jturner@cvs.openbsd.org> | 2014-09-29 22:56:14 +0000 |
commit | 23614ed0420befb9fbac99215dac7858378cef18 (patch) | |
tree | 34f46e8142f55361d4f9d49e20e6c27e17fcb4d6 /lib | |
parent | 7314837cf069a9bc97368fc958a6cd4b5f6010b0 (diff) |
Update sqlite3 to 3.8.6. A list of changes are available here:
http://sqlite.org/releaselog/3_8_6.html.
Tested in a bulk and ok landry@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libsqlite3/ext/misc/compress.c | 11 | ||||
-rw-r--r-- | lib/libsqlite3/src/os_win.h | 21 | ||||
-rw-r--r-- | lib/libsqlite3/tool/showstat4.c | 9 |
3 files changed, 6 insertions, 35 deletions
diff --git a/lib/libsqlite3/ext/misc/compress.c b/lib/libsqlite3/ext/misc/compress.c index bf38d4c93cf..a4059116c9e 100644 --- a/lib/libsqlite3/ext/misc/compress.c +++ b/lib/libsqlite3/ext/misc/compress.c @@ -38,7 +38,6 @@ static void compressFunc( unsigned int nIn; unsigned long int nOut; unsigned char x[8]; - int rc; int i, j; pIn = sqlite3_value_blob(argv[0]); @@ -51,12 +50,8 @@ static void compressFunc( for(i=0; i<4 && x[i]==0; i++){} for(j=0; i<=4; i++, j++) pOut[j] = x[i]; pOut[j-1] |= 0x80; - rc = compress(&pOut[j], &nOut, pIn, nIn); - if( rc==Z_OK ){ - sqlite3_result_blob(context, pOut, nOut+j, sqlite3_free); - }else{ - sqlite3_free(pOut); - } + compress(&pOut[j], &nOut, pIn, nIn); + sqlite3_result_blob(context, pOut, nOut+j, sqlite3_free); } /* @@ -87,8 +82,6 @@ static void uncompressFunc( rc = uncompress(pOut, &nOut, &pIn[i], nIn-i); if( rc==Z_OK ){ sqlite3_result_blob(context, pOut, nOut, sqlite3_free); - }else{ - sqlite3_free(pOut); } } diff --git a/lib/libsqlite3/src/os_win.h b/lib/libsqlite3/src/os_win.h index 17d6a2bef46..d662cd467dd 100644 --- a/lib/libsqlite3/src/os_win.h +++ b/lib/libsqlite3/src/os_win.h @@ -64,25 +64,4 @@ # define SQLITE_OS_WINRT 0 #endif -/* -** For WinCE, some API function parameters do not appear to be declared as -** volatile. -*/ -#if SQLITE_OS_WINCE -# define SQLITE_WIN32_VOLATILE -#else -# define SQLITE_WIN32_VOLATILE volatile -#endif - -/* -** For some Windows sub-platforms, the _beginthreadex() / _endthreadex() -** functions are not available (e.g. those not using MSVC, Cygwin, etc). -*/ -#if SQLITE_OS_WIN && !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && \ - SQLITE_THREADSAFE>0 && !defined(__CYGWIN__) -# define SQLITE_OS_WIN_THREADS 1 -#else -# define SQLITE_OS_WIN_THREADS 0 -#endif - #endif /* _OS_WIN_H_ */ diff --git a/lib/libsqlite3/tool/showstat4.c b/lib/libsqlite3/tool/showstat4.c index 215962919ed..668d2106af2 100644 --- a/lib/libsqlite3/tool/showstat4.c +++ b/lib/libsqlite3/tool/showstat4.c @@ -39,7 +39,6 @@ int main(int argc, char **argv){ int nSample; i64 iVal; const char *zSep; - int iRow = 0; if( argc!=2 ){ fprintf(stderr, "Usage: %s DATABASE-FILE\n", argv[0]); @@ -61,13 +60,13 @@ int main(int argc, char **argv){ } while( SQLITE_ROW==sqlite3_step(pStmt) ){ if( zIdx==0 || strcmp(zIdx, (const char*)sqlite3_column_text(pStmt,0))!=0 ){ - if( zIdx ) printf("\n**************************************" - "**************\n\n"); + if( zIdx ) printf("\n"); sqlite3_free(zIdx); zIdx = sqlite3_mprintf("%s", sqlite3_column_text(pStmt,0)); - iRow = 0; + printf("%s:\n", zIdx); + }else{ + printf(" -----------------------------------------------------------\n"); } - printf("%s sample %d ------------------------------------\n", zIdx, ++iRow); printf(" nEq = %s\n", sqlite3_column_text(pStmt,1)); printf(" nLt = %s\n", sqlite3_column_text(pStmt,2)); printf(" nDLt = %s\n", sqlite3_column_text(pStmt,3)); |