Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Import compiler warning and autoconf makefile fixes from trunk. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | apple-osx |
Files: | files | file ages | folders |
SHA1: |
5437e0534a9647b449474df140a88bb8 |
User & Date: | drh 2014-12-05 00:49:47.900 |
Context
2014-12-05
| ||
20:16 | Merge the shared-cache KeyInfo fix from trunk. (check-in: 8a9b43f930 user: drh tags: apple-osx) | |
00:49 | Import compiler warning and autoconf makefile fixes from trunk. (check-in: 5437e0534a user: drh tags: apple-osx) | |
00:32 | Fix compiler warnings. (check-in: e9955c0e14 user: drh tags: trunk) | |
2014-12-04
| ||
23:42 | Import from trunk support for SQLITE_CHECKPOINT_TRUNCATE and fixes for a couple of obscure bugs. (check-in: 463ad971d2 user: drh tags: apple-osx) | |
Changes
Changes to Makefile.in.
︙ | ︙ | |||
358 359 360 361 362 363 364 365 366 367 368 369 370 371 | $(TOP)/src/test6.c \ $(TOP)/src/test7.c \ $(TOP)/src/test8.c \ $(TOP)/src/test9.c \ $(TOP)/src/test_autoext.c \ $(TOP)/src/test_async.c \ $(TOP)/src/test_backup.c \ $(TOP)/src/test_btree.c \ $(TOP)/src/test_config.c \ $(TOP)/src/test_demovfs.c \ $(TOP)/src/test_devsym.c \ $(TOP)/src/test_fs.c \ $(TOP)/src/test_func.c \ $(TOP)/src/test_hexio.c \ | > | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | $(TOP)/src/test6.c \ $(TOP)/src/test7.c \ $(TOP)/src/test8.c \ $(TOP)/src/test9.c \ $(TOP)/src/test_autoext.c \ $(TOP)/src/test_async.c \ $(TOP)/src/test_backup.c \ $(TOP)/src/test_blob.c \ $(TOP)/src/test_btree.c \ $(TOP)/src/test_config.c \ $(TOP)/src/test_demovfs.c \ $(TOP)/src/test_devsym.c \ $(TOP)/src/test_fs.c \ $(TOP)/src/test_func.c \ $(TOP)/src/test_hexio.c \ |
︙ | ︙ |
Changes to Makefile.msc.
︙ | ︙ | |||
824 825 826 827 828 829 830 831 832 833 834 835 836 837 | $(TOP)\src\test6.c \ $(TOP)\src\test7.c \ $(TOP)\src\test8.c \ $(TOP)\src\test9.c \ $(TOP)\src\test_autoext.c \ $(TOP)\src\test_async.c \ $(TOP)\src\test_backup.c \ $(TOP)\src\test_btree.c \ $(TOP)\src\test_config.c \ $(TOP)\src\test_demovfs.c \ $(TOP)\src\test_devsym.c \ $(TOP)\src\test_fs.c \ $(TOP)\src\test_func.c \ $(TOP)\src\test_hexio.c \ | > | 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 | $(TOP)\src\test6.c \ $(TOP)\src\test7.c \ $(TOP)\src\test8.c \ $(TOP)\src\test9.c \ $(TOP)\src\test_autoext.c \ $(TOP)\src\test_async.c \ $(TOP)\src\test_backup.c \ $(TOP)\src\test_blob.c \ $(TOP)\src\test_btree.c \ $(TOP)\src\test_config.c \ $(TOP)\src\test_demovfs.c \ $(TOP)\src\test_devsym.c \ $(TOP)\src\test_fs.c \ $(TOP)\src\test_func.c \ $(TOP)\src\test_hexio.c \ |
︙ | ︙ |
Changes to ext/misc/eval.c.
︙ | ︙ | |||
17 18 19 20 21 22 23 | SQLITE_EXTENSION_INIT1 #include <string.h> /* ** Structure used to accumulate the output */ struct EvalResult { | | | | | | | > > > | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | SQLITE_EXTENSION_INIT1 #include <string.h> /* ** Structure used to accumulate the output */ struct EvalResult { char *z; /* Accumulated output */ const char *zSep; /* Separator */ int szSep; /* Size of the separator string */ sqlite3_int64 nAlloc; /* Number of bytes allocated for z[] */ sqlite3_int64 nUsed; /* Number of bytes of z[] actually used */ }; /* ** Callback from sqlite_exec() for the eval() function. */ static int callback(void *pCtx, int argc, char **argv, char **colnames){ struct EvalResult *p = (struct EvalResult*)pCtx; int i; for(i=0; i<argc; i++){ const char *z = argv[i] ? argv[i] : ""; size_t sz = strlen(z); if( (sqlite3_int64)sz+p->nUsed+p->szSep+1 > p->nAlloc ){ char *zNew; p->nAlloc = p->nAlloc*2 + sz + p->szSep + 1; /* Using sqlite3_realloc64() would be better, but it is a recent ** addition and will cause a segfault if loaded by an older version ** of SQLite. */ zNew = p->nAlloc<=0x7fffffff ? sqlite3_realloc(p->z, (int)p->nAlloc) : 0; if( zNew==0 ){ sqlite3_free(p->z); memset(p, 0, sizeof(*p)); return 1; } p->z = zNew; } |
︙ | ︙ | |||
89 90 91 92 93 94 95 | if( rc!=SQLITE_OK ){ sqlite3_result_error(context, zErr, -1); sqlite3_free(zErr); }else if( x.zSep==0 ){ sqlite3_result_error_nomem(context); sqlite3_free(x.z); }else{ | | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | if( rc!=SQLITE_OK ){ sqlite3_result_error(context, zErr, -1); sqlite3_free(zErr); }else if( x.zSep==0 ){ sqlite3_result_error_nomem(context); sqlite3_free(x.z); }else{ sqlite3_result_text(context, x.z, (int)x.nUsed, sqlite3_free); } } #ifdef _WIN32 __declspec(dllexport) #endif |
︙ | ︙ |
Changes to src/test1.c.
︙ | ︙ | |||
3675 3676 3677 3678 3679 3680 3681 | /* Instead of using zSql directly, make a copy into a buffer obtained ** directly from malloc(). The idea is to make it easier for valgrind ** to spot buffer overreads. */ if( bytes>=0 ){ zCopy = malloc(bytes); memcpy(zCopy, zSql, bytes); }else{ | | | 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 | /* Instead of using zSql directly, make a copy into a buffer obtained ** directly from malloc(). The idea is to make it easier for valgrind ** to spot buffer overreads. */ if( bytes>=0 ){ zCopy = malloc(bytes); memcpy(zCopy, zSql, bytes); }else{ int n = (int)strlen(zSql) + 1; zCopy = malloc(n); memcpy(zCopy, zSql, n); } rc = sqlite3_prepare_v2(db, zCopy, bytes, &pStmt, objc>=5 ? &zTail : 0); free(zCopy); zTail = &zSql[(zTail - zCopy)]; |
︙ | ︙ |