Fossil SCM
Merge updates from trunk. Fix compiler warnings.
Commit
cfd3a5b944ea15f479ed3e7fee4e7fe54ac67a2c
Parent
0e782b3d7c05fae…
21 files changed
+2
+2
-2
+1
-9
+36
-27
+1
-1
+20
-17
+2
-2
+48
-3
+1
-1
+1
-1
+16
+1
-1
+3
-3
+17
+35
-9
+17
+1
-1
+1
-1
+1
-1
+4
-2
+14
-8
~
src/checkin.c
~
src/makemake.tcl
~
src/printf.c
~
src/sqlite3.c
~
src/sqlite3.h
~
src/statrep.c
~
src/th_lang.c
~
src/th_main.c
~
src/timeline.c
~
src/timeline.c
~
test/amend.test
~
test/merge6.test
~
test/merge_renames.test
~
test/revert.test
~
test/tester.tcl
~
test/th1.test
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
win/buildmsvc.bat
~
www/build.wiki
+2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -396,10 +396,12 @@ | ||
| 396 | 396 | if( zRev!=0 ){ |
| 397 | 397 | db_find_and_open_repository(0, 0); |
| 398 | 398 | verify_all_options(); |
| 399 | 399 | ls_cmd_rev(zRev,verboseFlag,showAge,timeOrder); |
| 400 | 400 | return; |
| 401 | + }else if( find_option("R",0,1)!=0 ){ | |
| 402 | + fossil_fatal("the -r is required in addition to -R"); | |
| 401 | 403 | } |
| 402 | 404 | |
| 403 | 405 | db_must_be_within_tree(); |
| 404 | 406 | vid = db_lget_int("checkout", 0); |
| 405 | 407 | if( timeOrder ){ |
| 406 | 408 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -396,10 +396,12 @@ | |
| 396 | if( zRev!=0 ){ |
| 397 | db_find_and_open_repository(0, 0); |
| 398 | verify_all_options(); |
| 399 | ls_cmd_rev(zRev,verboseFlag,showAge,timeOrder); |
| 400 | return; |
| 401 | } |
| 402 | |
| 403 | db_must_be_within_tree(); |
| 404 | vid = db_lget_int("checkout", 0); |
| 405 | if( timeOrder ){ |
| 406 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -396,10 +396,12 @@ | |
| 396 | if( zRev!=0 ){ |
| 397 | db_find_and_open_repository(0, 0); |
| 398 | verify_all_options(); |
| 399 | ls_cmd_rev(zRev,verboseFlag,showAge,timeOrder); |
| 400 | return; |
| 401 | }else if( find_option("R",0,1)!=0 ){ |
| 402 | fossil_fatal("the -r is required in addition to -R"); |
| 403 | } |
| 404 | |
| 405 | db_must_be_within_tree(); |
| 406 | vid = db_lget_int("checkout", 0); |
| 407 | if( timeOrder ){ |
| 408 |
+2
-2
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -617,11 +617,11 @@ | ||
| 617 | 617 | #### The directories where the OpenSSL include and library files are located. |
| 618 | 618 | # The recommended usage here is to use the Sysinternals junction tool |
| 619 | 619 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 620 | 620 | # Fossil source code directory and the target OpenSSL source directory. |
| 621 | 621 | # |
| 622 | -OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e | |
| 622 | +OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f | |
| 623 | 623 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 624 | 624 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 625 | 625 | |
| 626 | 626 | #### Either the directory where the Tcl library is installed or the Tcl |
| 627 | 627 | # source code directory resides (depending on the value of the macro |
| @@ -1406,11 +1406,11 @@ | ||
| 1406 | 1406 | !ifndef FOSSIL_ENABLE_WINXP |
| 1407 | 1407 | FOSSIL_ENABLE_WINXP = 0 |
| 1408 | 1408 | !endif |
| 1409 | 1409 | |
| 1410 | 1410 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1411 | -SSLDIR = $(B)\compat\openssl-1.0.2e | |
| 1411 | +SSLDIR = $(B)\compat\openssl-1.0.2f | |
| 1412 | 1412 | SSLINCDIR = $(SSLDIR)\inc32 |
| 1413 | 1413 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1414 | 1414 | SSLLIBDIR = $(SSLDIR)\out32dll |
| 1415 | 1415 | !else |
| 1416 | 1416 | SSLLIBDIR = $(SSLDIR)\out32 |
| 1417 | 1417 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -617,11 +617,11 @@ | |
| 617 | #### The directories where the OpenSSL include and library files are located. |
| 618 | # The recommended usage here is to use the Sysinternals junction tool |
| 619 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 620 | # Fossil source code directory and the target OpenSSL source directory. |
| 621 | # |
| 622 | OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e |
| 623 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 624 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 625 | |
| 626 | #### Either the directory where the Tcl library is installed or the Tcl |
| 627 | # source code directory resides (depending on the value of the macro |
| @@ -1406,11 +1406,11 @@ | |
| 1406 | !ifndef FOSSIL_ENABLE_WINXP |
| 1407 | FOSSIL_ENABLE_WINXP = 0 |
| 1408 | !endif |
| 1409 | |
| 1410 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1411 | SSLDIR = $(B)\compat\openssl-1.0.2e |
| 1412 | SSLINCDIR = $(SSLDIR)\inc32 |
| 1413 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1414 | SSLLIBDIR = $(SSLDIR)\out32dll |
| 1415 | !else |
| 1416 | SSLLIBDIR = $(SSLDIR)\out32 |
| 1417 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -617,11 +617,11 @@ | |
| 617 | #### The directories where the OpenSSL include and library files are located. |
| 618 | # The recommended usage here is to use the Sysinternals junction tool |
| 619 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 620 | # Fossil source code directory and the target OpenSSL source directory. |
| 621 | # |
| 622 | OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f |
| 623 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 624 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 625 | |
| 626 | #### Either the directory where the Tcl library is installed or the Tcl |
| 627 | # source code directory resides (depending on the value of the macro |
| @@ -1406,11 +1406,11 @@ | |
| 1406 | !ifndef FOSSIL_ENABLE_WINXP |
| 1407 | FOSSIL_ENABLE_WINXP = 0 |
| 1408 | !endif |
| 1409 | |
| 1410 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1411 | SSLDIR = $(B)\compat\openssl-1.0.2f |
| 1412 | SSLINCDIR = $(SSLDIR)\inc32 |
| 1413 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1414 | SSLLIBDIR = $(SSLDIR)\out32dll |
| 1415 | !else |
| 1416 | SSLLIBDIR = $(SSLDIR)\out32 |
| 1417 |
+1
-9
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -232,19 +232,11 @@ | ||
| 232 | 232 | |
| 233 | 233 | /* |
| 234 | 234 | ** The root program. All variations call this core. |
| 235 | 235 | ** |
| 236 | 236 | ** INPUTS: |
| 237 | -** func This is a pointer to a function taking three arguments | |
| 238 | -** 1. A pointer to anything. Same as the "arg" parameter. | |
| 239 | -** 2. A pointer to the list of characters to be output | |
| 240 | -** (Note, this list is NOT null terminated.) | |
| 241 | -** 3. An integer number of characters to be output. | |
| 242 | -** (Note: This number might be zero.) | |
| 243 | -** | |
| 244 | -** arg This is the pointer to anything which will be passed as the | |
| 245 | -** first argument to "func". Use it for whatever you like. | |
| 237 | +** pBlob This is the blob where the output will be built. | |
| 246 | 238 | ** |
| 247 | 239 | ** fmt This is the format string, as in the usual print. |
| 248 | 240 | ** |
| 249 | 241 | ** ap This is a pointer to a list of arguments. Same as in |
| 250 | 242 | ** vfprint. |
| 251 | 243 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -232,19 +232,11 @@ | |
| 232 | |
| 233 | /* |
| 234 | ** The root program. All variations call this core. |
| 235 | ** |
| 236 | ** INPUTS: |
| 237 | ** func This is a pointer to a function taking three arguments |
| 238 | ** 1. A pointer to anything. Same as the "arg" parameter. |
| 239 | ** 2. A pointer to the list of characters to be output |
| 240 | ** (Note, this list is NOT null terminated.) |
| 241 | ** 3. An integer number of characters to be output. |
| 242 | ** (Note: This number might be zero.) |
| 243 | ** |
| 244 | ** arg This is the pointer to anything which will be passed as the |
| 245 | ** first argument to "func". Use it for whatever you like. |
| 246 | ** |
| 247 | ** fmt This is the format string, as in the usual print. |
| 248 | ** |
| 249 | ** ap This is a pointer to a list of arguments. Same as in |
| 250 | ** vfprint. |
| 251 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -232,19 +232,11 @@ | |
| 232 | |
| 233 | /* |
| 234 | ** The root program. All variations call this core. |
| 235 | ** |
| 236 | ** INPUTS: |
| 237 | ** pBlob This is the blob where the output will be built. |
| 238 | ** |
| 239 | ** fmt This is the format string, as in the usual print. |
| 240 | ** |
| 241 | ** ap This is a pointer to a list of arguments. Same as in |
| 242 | ** vfprint. |
| 243 |
+36
-27
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -327,11 +327,11 @@ | ||
| 327 | 327 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 328 | 328 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 329 | 329 | */ |
| 330 | 330 | #define SQLITE_VERSION "3.11.0" |
| 331 | 331 | #define SQLITE_VERSION_NUMBER 3011000 |
| 332 | -#define SQLITE_SOURCE_ID "2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5" | |
| 332 | +#define SQLITE_SOURCE_ID "2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1" | |
| 333 | 333 | |
| 334 | 334 | /* |
| 335 | 335 | ** CAPI3REF: Run-Time Library Version Numbers |
| 336 | 336 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 337 | 337 | ** |
| @@ -13663,11 +13663,11 @@ | ||
| 13663 | 13663 | ** each recursion. The boundary between these two regions is determined |
| 13664 | 13664 | ** using offsetof(Parse,nVar) so the nVar field must be the first field |
| 13665 | 13665 | ** in the recursive region. |
| 13666 | 13666 | ************************************************************************/ |
| 13667 | 13667 | |
| 13668 | - int nVar; /* Number of '?' variables seen in the SQL so far */ | |
| 13668 | + ynVar nVar; /* Number of '?' variables seen in the SQL so far */ | |
| 13669 | 13669 | int nzVar; /* Number of available slots in azVar[] */ |
| 13670 | 13670 | u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */ |
| 13671 | 13671 | u8 explain; /* True if the EXPLAIN flag is found on the query */ |
| 13672 | 13672 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 13673 | 13673 | u8 declareVtab; /* True if inside sqlite3_declare_vtab() */ |
| @@ -13945,14 +13945,14 @@ | ||
| 13945 | 13945 | |
| 13946 | 13946 | /* |
| 13947 | 13947 | ** Context pointer passed down through the tree-walk. |
| 13948 | 13948 | */ |
| 13949 | 13949 | struct Walker { |
| 13950 | + Parse *pParse; /* Parser context. */ | |
| 13950 | 13951 | int (*xExprCallback)(Walker*, Expr*); /* Callback for expressions */ |
| 13951 | 13952 | int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */ |
| 13952 | 13953 | void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */ |
| 13953 | - Parse *pParse; /* Parser context. */ | |
| 13954 | 13954 | int walkerDepth; /* Number of subqueries */ |
| 13955 | 13955 | u8 eCode; /* A small processing code */ |
| 13956 | 13956 | union { /* Extra data for callback */ |
| 13957 | 13957 | NameContext *pNC; /* Naming context */ |
| 13958 | 13958 | int n; /* A counter */ |
| @@ -22394,12 +22394,13 @@ | ||
| 22394 | 22394 | } |
| 22395 | 22395 | return p; |
| 22396 | 22396 | } |
| 22397 | 22397 | |
| 22398 | 22398 | /* |
| 22399 | -** Allocate and zero memory. If the allocation fails, make | |
| 22400 | -** the mallocFailed flag in the connection pointer. | |
| 22399 | +** Allocate memory, either lookaside (if possible) or heap. | |
| 22400 | +** If the allocation fails, set the mallocFailed flag in | |
| 22401 | +** the connection pointer. | |
| 22401 | 22402 | ** |
| 22402 | 22403 | ** If db!=0 and db->mallocFailed is true (indicating a prior malloc |
| 22403 | 22404 | ** failure on the same database connection) then always return 0. |
| 22404 | 22405 | ** Hence for a particular database connection, once malloc starts |
| 22405 | 22406 | ** failing, it fails consistently until mallocFailed is reset. |
| @@ -22411,12 +22412,12 @@ | ||
| 22411 | 22412 | ** if( b ) a[10] = 9; |
| 22412 | 22413 | ** |
| 22413 | 22414 | ** In other words, if a subsequent malloc (ex: "b") worked, it is assumed |
| 22414 | 22415 | ** that all prior mallocs (ex: "a") worked too. |
| 22415 | 22416 | */ |
| 22417 | +static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n); | |
| 22416 | 22418 | SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, u64 n){ |
| 22417 | - void *p; | |
| 22418 | 22419 | assert( db==0 || sqlite3_mutex_held(db->mutex) ); |
| 22419 | 22420 | assert( db==0 || db->pnBytesFreed==0 ); |
| 22420 | 22421 | #ifndef SQLITE_OMIT_LOOKASIDE |
| 22421 | 22422 | if( db ){ |
| 22422 | 22423 | LookasideSlot *pBuf; |
| @@ -22442,11 +22443,14 @@ | ||
| 22442 | 22443 | #else |
| 22443 | 22444 | if( db && db->mallocFailed ){ |
| 22444 | 22445 | return 0; |
| 22445 | 22446 | } |
| 22446 | 22447 | #endif |
| 22447 | - p = sqlite3Malloc(n); | |
| 22448 | + return dbMallocRawFinish(db, n); | |
| 22449 | +} | |
| 22450 | +static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n){ | |
| 22451 | + void *p = sqlite3Malloc(n); | |
| 22448 | 22452 | if( !p && db ){ |
| 22449 | 22453 | db->mallocFailed = 1; |
| 22450 | 22454 | } |
| 22451 | 22455 | sqlite3MemdebugSetType(p, |
| 22452 | 22456 | (db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP); |
| @@ -62524,13 +62528,12 @@ | ||
| 62524 | 62528 | ** This must be done in advance. Once the balance starts, the cell |
| 62525 | 62529 | ** offset section of the btree page will be overwritten and we will no |
| 62526 | 62530 | ** long be able to find the cells if a pointer to each cell is not saved |
| 62527 | 62531 | ** first. |
| 62528 | 62532 | */ |
| 62529 | - memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*limit); | |
| 62533 | + memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow)); | |
| 62530 | 62534 | if( pOld->nOverflow>0 ){ |
| 62531 | - memset(&b.szCell[b.nCell+limit], 0, sizeof(b.szCell[0])*pOld->nOverflow); | |
| 62532 | 62535 | limit = pOld->aiOvfl[0]; |
| 62533 | 62536 | for(j=0; j<limit; j++){ |
| 62534 | 62537 | b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell)); |
| 62535 | 62538 | piCell += 2; |
| 62536 | 62539 | b.nCell++; |
| @@ -68390,11 +68393,12 @@ | ||
| 68390 | 68393 | VdbeOp *pOp; |
| 68391 | 68394 | if( p->db->mallocFailed ) return 0; |
| 68392 | 68395 | assert( addr>=0 && addr<p->nOp ); |
| 68393 | 68396 | pOp = &p->aOp[addr]; |
| 68394 | 68397 | freeP4(p->db, pOp->p4type, pOp->p4.p); |
| 68395 | - memset(pOp, 0, sizeof(pOp[0])); | |
| 68398 | + pOp->p4type = P4_NOTUSED; | |
| 68399 | + pOp->p4.z = 0; | |
| 68396 | 68400 | pOp->opcode = OP_Noop; |
| 68397 | 68401 | return 1; |
| 68398 | 68402 | } |
| 68399 | 68403 | |
| 68400 | 68404 | /* |
| @@ -69438,11 +69442,10 @@ | ||
| 69438 | 69442 | do { |
| 69439 | 69443 | nByte = 0; |
| 69440 | 69444 | p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), zCsr, &nFree, &nByte); |
| 69441 | 69445 | p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), zCsr, &nFree, &nByte); |
| 69442 | 69446 | p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), zCsr, &nFree, &nByte); |
| 69443 | - p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), zCsr, &nFree, &nByte); | |
| 69444 | 69447 | p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*), |
| 69445 | 69448 | zCsr, &nFree, &nByte); |
| 69446 | 69449 | p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, zCsr, &nFree, &nByte); |
| 69447 | 69450 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 69448 | 69451 | p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), zCsr, &nFree, &nByte); |
| @@ -69461,15 +69464,14 @@ | ||
| 69461 | 69464 | for(n=0; n<nVar; n++){ |
| 69462 | 69465 | p->aVar[n].flags = MEM_Null; |
| 69463 | 69466 | p->aVar[n].db = db; |
| 69464 | 69467 | } |
| 69465 | 69468 | } |
| 69466 | - if( p->azVar && pParse->nzVar>0 ){ | |
| 69467 | - p->nzVar = pParse->nzVar; | |
| 69468 | - memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0])); | |
| 69469 | - memset(pParse->azVar, 0, pParse->nzVar*sizeof(pParse->azVar[0])); | |
| 69470 | - } | |
| 69469 | + p->nzVar = pParse->nzVar; | |
| 69470 | + p->azVar = pParse->azVar; | |
| 69471 | + pParse->nzVar = 0; | |
| 69472 | + pParse->azVar = 0; | |
| 69471 | 69473 | if( p->aMem ){ |
| 69472 | 69474 | p->aMem--; /* aMem[] goes from 1..nMem */ |
| 69473 | 69475 | p->nMem = nMem; /* not from 0..nMem-1 */ |
| 69474 | 69476 | for(n=1; n<=nMem; n++){ |
| 69475 | 69477 | p->aMem[n].flags = MEM_Undefined; |
| @@ -70452,10 +70454,11 @@ | ||
| 70452 | 70454 | pNext = pSub->pNext; |
| 70453 | 70455 | vdbeFreeOpArray(db, pSub->aOp, pSub->nOp); |
| 70454 | 70456 | sqlite3DbFree(db, pSub); |
| 70455 | 70457 | } |
| 70456 | 70458 | for(i=p->nzVar-1; i>=0; i--) sqlite3DbFree(db, p->azVar[i]); |
| 70459 | + sqlite3DbFree(db, p->azVar); | |
| 70457 | 70460 | vdbeFreeOpArray(db, p->aOp, p->nOp); |
| 70458 | 70461 | sqlite3DbFree(db, p->aColName); |
| 70459 | 70462 | sqlite3DbFree(db, p->zSql); |
| 70460 | 70463 | sqlite3DbFree(db, p->pFree); |
| 70461 | 70464 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| @@ -71196,13 +71199,13 @@ | ||
| 71196 | 71199 | v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc); |
| 71197 | 71200 | n1 = v1==0 ? 0 : c1.n; |
| 71198 | 71201 | v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc); |
| 71199 | 71202 | n2 = v2==0 ? 0 : c2.n; |
| 71200 | 71203 | rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2); |
| 71204 | + if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM; | |
| 71201 | 71205 | sqlite3VdbeMemRelease(&c1); |
| 71202 | 71206 | sqlite3VdbeMemRelease(&c2); |
| 71203 | - if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM; | |
| 71204 | 71207 | return rc; |
| 71205 | 71208 | } |
| 71206 | 71209 | } |
| 71207 | 71210 | |
| 71208 | 71211 | /* |
| @@ -71986,15 +71989,17 @@ | ||
| 71986 | 71989 | ** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored |
| 71987 | 71990 | ** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored |
| 71988 | 71991 | ** in memory obtained from sqlite3DbMalloc). |
| 71989 | 71992 | */ |
| 71990 | 71993 | SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){ |
| 71991 | - sqlite3 *db = p->db; | |
| 71992 | - sqlite3DbFree(db, p->zErrMsg); | |
| 71993 | - p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg); | |
| 71994 | - sqlite3_free(pVtab->zErrMsg); | |
| 71995 | - pVtab->zErrMsg = 0; | |
| 71994 | + if( pVtab->zErrMsg ){ | |
| 71995 | + sqlite3 *db = p->db; | |
| 71996 | + sqlite3DbFree(db, p->zErrMsg); | |
| 71997 | + p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg); | |
| 71998 | + sqlite3_free(pVtab->zErrMsg); | |
| 71999 | + pVtab->zErrMsg = 0; | |
| 72000 | + } | |
| 71996 | 72001 | } |
| 71997 | 72002 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 71998 | 72003 | |
| 71999 | 72004 | /************** End of vdbeaux.c *********************************************/ |
| 72000 | 72005 | /************** Begin file vdbeapi.c *****************************************/ |
| @@ -86034,14 +86039,16 @@ | ||
| 86034 | 86039 | pParse->nHeight += pExpr->nHeight; |
| 86035 | 86040 | } |
| 86036 | 86041 | #endif |
| 86037 | 86042 | savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg); |
| 86038 | 86043 | pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg); |
| 86039 | - memset(&w, 0, sizeof(w)); | |
| 86044 | + w.pParse = pNC->pParse; | |
| 86040 | 86045 | w.xExprCallback = resolveExprStep; |
| 86041 | 86046 | w.xSelectCallback = resolveSelectStep; |
| 86042 | - w.pParse = pNC->pParse; | |
| 86047 | + w.xSelectCallback2 = 0; | |
| 86048 | + w.walkerDepth = 0; | |
| 86049 | + w.eCode = 0; | |
| 86043 | 86050 | w.u.pNC = pNC; |
| 86044 | 86051 | sqlite3WalkExpr(&w, pExpr); |
| 86045 | 86052 | #if SQLITE_MAX_EXPR_DEPTH>0 |
| 86046 | 86053 | pNC->pParse->nHeight -= pExpr->nHeight; |
| 86047 | 86054 | #endif |
| @@ -100498,11 +100505,11 @@ | ||
| 100498 | 100505 | continue; |
| 100499 | 100506 | } |
| 100500 | 100507 | } |
| 100501 | 100508 | c2 = Utf8Read(zString); |
| 100502 | 100509 | if( c==c2 ) continue; |
| 100503 | - if( noCase && sqlite3Tolower(c)==sqlite3Tolower(c2) ){ | |
| 100510 | + if( noCase && c<0x80 && c2<0x80 && sqlite3Tolower(c)==sqlite3Tolower(c2) ){ | |
| 100504 | 100511 | continue; |
| 100505 | 100512 | } |
| 100506 | 100513 | if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue; |
| 100507 | 100514 | return 0; |
| 100508 | 100515 | } |
| @@ -121631,10 +121638,11 @@ | ||
| 121631 | 121638 | int cnt; /* Number of non-wildcard prefix characters */ |
| 121632 | 121639 | char wc[3]; /* Wildcard characters */ |
| 121633 | 121640 | sqlite3 *db = pParse->db; /* Database connection */ |
| 121634 | 121641 | sqlite3_value *pVal = 0; |
| 121635 | 121642 | int op; /* Opcode of pRight */ |
| 121643 | + int rc; /* Result code to return */ | |
| 121636 | 121644 | |
| 121637 | 121645 | if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){ |
| 121638 | 121646 | return 0; |
| 121639 | 121647 | } |
| 121640 | 121648 | #ifdef SQLITE_EBCDIC |
| @@ -121696,12 +121704,13 @@ | ||
| 121696 | 121704 | }else{ |
| 121697 | 121705 | z = 0; |
| 121698 | 121706 | } |
| 121699 | 121707 | } |
| 121700 | 121708 | |
| 121709 | + rc = (z!=0); | |
| 121701 | 121710 | sqlite3ValueFree(pVal); |
| 121702 | - return (z!=0); | |
| 121711 | + return rc; | |
| 121703 | 121712 | } |
| 121704 | 121713 | #endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */ |
| 121705 | 121714 | |
| 121706 | 121715 | |
| 121707 | 121716 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| @@ -183596,11 +183605,11 @@ | ||
| 183596 | 183605 | sqlite3_context *pCtx, /* Function call context */ |
| 183597 | 183606 | int nArg, /* Number of args */ |
| 183598 | 183607 | sqlite3_value **apVal /* Function arguments */ |
| 183599 | 183608 | ){ |
| 183600 | 183609 | assert( nArg==0 ); |
| 183601 | - sqlite3_result_text(pCtx, "fts5: 2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5", -1, SQLITE_TRANSIENT); | |
| 183610 | + sqlite3_result_text(pCtx, "fts5: 2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1", -1, SQLITE_TRANSIENT); | |
| 183602 | 183611 | } |
| 183603 | 183612 | |
| 183604 | 183613 | static int fts5Init(sqlite3 *db){ |
| 183605 | 183614 | static const sqlite3_module fts5Mod = { |
| 183606 | 183615 | /* iVersion */ 2, |
| 183607 | 183616 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -327,11 +327,11 @@ | |
| 327 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 328 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 329 | */ |
| 330 | #define SQLITE_VERSION "3.11.0" |
| 331 | #define SQLITE_VERSION_NUMBER 3011000 |
| 332 | #define SQLITE_SOURCE_ID "2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5" |
| 333 | |
| 334 | /* |
| 335 | ** CAPI3REF: Run-Time Library Version Numbers |
| 336 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 337 | ** |
| @@ -13663,11 +13663,11 @@ | |
| 13663 | ** each recursion. The boundary between these two regions is determined |
| 13664 | ** using offsetof(Parse,nVar) so the nVar field must be the first field |
| 13665 | ** in the recursive region. |
| 13666 | ************************************************************************/ |
| 13667 | |
| 13668 | int nVar; /* Number of '?' variables seen in the SQL so far */ |
| 13669 | int nzVar; /* Number of available slots in azVar[] */ |
| 13670 | u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */ |
| 13671 | u8 explain; /* True if the EXPLAIN flag is found on the query */ |
| 13672 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 13673 | u8 declareVtab; /* True if inside sqlite3_declare_vtab() */ |
| @@ -13945,14 +13945,14 @@ | |
| 13945 | |
| 13946 | /* |
| 13947 | ** Context pointer passed down through the tree-walk. |
| 13948 | */ |
| 13949 | struct Walker { |
| 13950 | int (*xExprCallback)(Walker*, Expr*); /* Callback for expressions */ |
| 13951 | int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */ |
| 13952 | void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */ |
| 13953 | Parse *pParse; /* Parser context. */ |
| 13954 | int walkerDepth; /* Number of subqueries */ |
| 13955 | u8 eCode; /* A small processing code */ |
| 13956 | union { /* Extra data for callback */ |
| 13957 | NameContext *pNC; /* Naming context */ |
| 13958 | int n; /* A counter */ |
| @@ -22394,12 +22394,13 @@ | |
| 22394 | } |
| 22395 | return p; |
| 22396 | } |
| 22397 | |
| 22398 | /* |
| 22399 | ** Allocate and zero memory. If the allocation fails, make |
| 22400 | ** the mallocFailed flag in the connection pointer. |
| 22401 | ** |
| 22402 | ** If db!=0 and db->mallocFailed is true (indicating a prior malloc |
| 22403 | ** failure on the same database connection) then always return 0. |
| 22404 | ** Hence for a particular database connection, once malloc starts |
| 22405 | ** failing, it fails consistently until mallocFailed is reset. |
| @@ -22411,12 +22412,12 @@ | |
| 22411 | ** if( b ) a[10] = 9; |
| 22412 | ** |
| 22413 | ** In other words, if a subsequent malloc (ex: "b") worked, it is assumed |
| 22414 | ** that all prior mallocs (ex: "a") worked too. |
| 22415 | */ |
| 22416 | SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, u64 n){ |
| 22417 | void *p; |
| 22418 | assert( db==0 || sqlite3_mutex_held(db->mutex) ); |
| 22419 | assert( db==0 || db->pnBytesFreed==0 ); |
| 22420 | #ifndef SQLITE_OMIT_LOOKASIDE |
| 22421 | if( db ){ |
| 22422 | LookasideSlot *pBuf; |
| @@ -22442,11 +22443,14 @@ | |
| 22442 | #else |
| 22443 | if( db && db->mallocFailed ){ |
| 22444 | return 0; |
| 22445 | } |
| 22446 | #endif |
| 22447 | p = sqlite3Malloc(n); |
| 22448 | if( !p && db ){ |
| 22449 | db->mallocFailed = 1; |
| 22450 | } |
| 22451 | sqlite3MemdebugSetType(p, |
| 22452 | (db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP); |
| @@ -62524,13 +62528,12 @@ | |
| 62524 | ** This must be done in advance. Once the balance starts, the cell |
| 62525 | ** offset section of the btree page will be overwritten and we will no |
| 62526 | ** long be able to find the cells if a pointer to each cell is not saved |
| 62527 | ** first. |
| 62528 | */ |
| 62529 | memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*limit); |
| 62530 | if( pOld->nOverflow>0 ){ |
| 62531 | memset(&b.szCell[b.nCell+limit], 0, sizeof(b.szCell[0])*pOld->nOverflow); |
| 62532 | limit = pOld->aiOvfl[0]; |
| 62533 | for(j=0; j<limit; j++){ |
| 62534 | b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell)); |
| 62535 | piCell += 2; |
| 62536 | b.nCell++; |
| @@ -68390,11 +68393,12 @@ | |
| 68390 | VdbeOp *pOp; |
| 68391 | if( p->db->mallocFailed ) return 0; |
| 68392 | assert( addr>=0 && addr<p->nOp ); |
| 68393 | pOp = &p->aOp[addr]; |
| 68394 | freeP4(p->db, pOp->p4type, pOp->p4.p); |
| 68395 | memset(pOp, 0, sizeof(pOp[0])); |
| 68396 | pOp->opcode = OP_Noop; |
| 68397 | return 1; |
| 68398 | } |
| 68399 | |
| 68400 | /* |
| @@ -69438,11 +69442,10 @@ | |
| 69438 | do { |
| 69439 | nByte = 0; |
| 69440 | p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), zCsr, &nFree, &nByte); |
| 69441 | p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), zCsr, &nFree, &nByte); |
| 69442 | p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), zCsr, &nFree, &nByte); |
| 69443 | p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), zCsr, &nFree, &nByte); |
| 69444 | p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*), |
| 69445 | zCsr, &nFree, &nByte); |
| 69446 | p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, zCsr, &nFree, &nByte); |
| 69447 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 69448 | p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), zCsr, &nFree, &nByte); |
| @@ -69461,15 +69464,14 @@ | |
| 69461 | for(n=0; n<nVar; n++){ |
| 69462 | p->aVar[n].flags = MEM_Null; |
| 69463 | p->aVar[n].db = db; |
| 69464 | } |
| 69465 | } |
| 69466 | if( p->azVar && pParse->nzVar>0 ){ |
| 69467 | p->nzVar = pParse->nzVar; |
| 69468 | memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0])); |
| 69469 | memset(pParse->azVar, 0, pParse->nzVar*sizeof(pParse->azVar[0])); |
| 69470 | } |
| 69471 | if( p->aMem ){ |
| 69472 | p->aMem--; /* aMem[] goes from 1..nMem */ |
| 69473 | p->nMem = nMem; /* not from 0..nMem-1 */ |
| 69474 | for(n=1; n<=nMem; n++){ |
| 69475 | p->aMem[n].flags = MEM_Undefined; |
| @@ -70452,10 +70454,11 @@ | |
| 70452 | pNext = pSub->pNext; |
| 70453 | vdbeFreeOpArray(db, pSub->aOp, pSub->nOp); |
| 70454 | sqlite3DbFree(db, pSub); |
| 70455 | } |
| 70456 | for(i=p->nzVar-1; i>=0; i--) sqlite3DbFree(db, p->azVar[i]); |
| 70457 | vdbeFreeOpArray(db, p->aOp, p->nOp); |
| 70458 | sqlite3DbFree(db, p->aColName); |
| 70459 | sqlite3DbFree(db, p->zSql); |
| 70460 | sqlite3DbFree(db, p->pFree); |
| 70461 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| @@ -71196,13 +71199,13 @@ | |
| 71196 | v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc); |
| 71197 | n1 = v1==0 ? 0 : c1.n; |
| 71198 | v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc); |
| 71199 | n2 = v2==0 ? 0 : c2.n; |
| 71200 | rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2); |
| 71201 | sqlite3VdbeMemRelease(&c1); |
| 71202 | sqlite3VdbeMemRelease(&c2); |
| 71203 | if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM; |
| 71204 | return rc; |
| 71205 | } |
| 71206 | } |
| 71207 | |
| 71208 | /* |
| @@ -71986,15 +71989,17 @@ | |
| 71986 | ** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored |
| 71987 | ** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored |
| 71988 | ** in memory obtained from sqlite3DbMalloc). |
| 71989 | */ |
| 71990 | SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){ |
| 71991 | sqlite3 *db = p->db; |
| 71992 | sqlite3DbFree(db, p->zErrMsg); |
| 71993 | p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg); |
| 71994 | sqlite3_free(pVtab->zErrMsg); |
| 71995 | pVtab->zErrMsg = 0; |
| 71996 | } |
| 71997 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 71998 | |
| 71999 | /************** End of vdbeaux.c *********************************************/ |
| 72000 | /************** Begin file vdbeapi.c *****************************************/ |
| @@ -86034,14 +86039,16 @@ | |
| 86034 | pParse->nHeight += pExpr->nHeight; |
| 86035 | } |
| 86036 | #endif |
| 86037 | savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg); |
| 86038 | pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg); |
| 86039 | memset(&w, 0, sizeof(w)); |
| 86040 | w.xExprCallback = resolveExprStep; |
| 86041 | w.xSelectCallback = resolveSelectStep; |
| 86042 | w.pParse = pNC->pParse; |
| 86043 | w.u.pNC = pNC; |
| 86044 | sqlite3WalkExpr(&w, pExpr); |
| 86045 | #if SQLITE_MAX_EXPR_DEPTH>0 |
| 86046 | pNC->pParse->nHeight -= pExpr->nHeight; |
| 86047 | #endif |
| @@ -100498,11 +100505,11 @@ | |
| 100498 | continue; |
| 100499 | } |
| 100500 | } |
| 100501 | c2 = Utf8Read(zString); |
| 100502 | if( c==c2 ) continue; |
| 100503 | if( noCase && sqlite3Tolower(c)==sqlite3Tolower(c2) ){ |
| 100504 | continue; |
| 100505 | } |
| 100506 | if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue; |
| 100507 | return 0; |
| 100508 | } |
| @@ -121631,10 +121638,11 @@ | |
| 121631 | int cnt; /* Number of non-wildcard prefix characters */ |
| 121632 | char wc[3]; /* Wildcard characters */ |
| 121633 | sqlite3 *db = pParse->db; /* Database connection */ |
| 121634 | sqlite3_value *pVal = 0; |
| 121635 | int op; /* Opcode of pRight */ |
| 121636 | |
| 121637 | if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){ |
| 121638 | return 0; |
| 121639 | } |
| 121640 | #ifdef SQLITE_EBCDIC |
| @@ -121696,12 +121704,13 @@ | |
| 121696 | }else{ |
| 121697 | z = 0; |
| 121698 | } |
| 121699 | } |
| 121700 | |
| 121701 | sqlite3ValueFree(pVal); |
| 121702 | return (z!=0); |
| 121703 | } |
| 121704 | #endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */ |
| 121705 | |
| 121706 | |
| 121707 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| @@ -183596,11 +183605,11 @@ | |
| 183596 | sqlite3_context *pCtx, /* Function call context */ |
| 183597 | int nArg, /* Number of args */ |
| 183598 | sqlite3_value **apVal /* Function arguments */ |
| 183599 | ){ |
| 183600 | assert( nArg==0 ); |
| 183601 | sqlite3_result_text(pCtx, "fts5: 2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5", -1, SQLITE_TRANSIENT); |
| 183602 | } |
| 183603 | |
| 183604 | static int fts5Init(sqlite3 *db){ |
| 183605 | static const sqlite3_module fts5Mod = { |
| 183606 | /* iVersion */ 2, |
| 183607 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -327,11 +327,11 @@ | |
| 327 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 328 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 329 | */ |
| 330 | #define SQLITE_VERSION "3.11.0" |
| 331 | #define SQLITE_VERSION_NUMBER 3011000 |
| 332 | #define SQLITE_SOURCE_ID "2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1" |
| 333 | |
| 334 | /* |
| 335 | ** CAPI3REF: Run-Time Library Version Numbers |
| 336 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 337 | ** |
| @@ -13663,11 +13663,11 @@ | |
| 13663 | ** each recursion. The boundary between these two regions is determined |
| 13664 | ** using offsetof(Parse,nVar) so the nVar field must be the first field |
| 13665 | ** in the recursive region. |
| 13666 | ************************************************************************/ |
| 13667 | |
| 13668 | ynVar nVar; /* Number of '?' variables seen in the SQL so far */ |
| 13669 | int nzVar; /* Number of available slots in azVar[] */ |
| 13670 | u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */ |
| 13671 | u8 explain; /* True if the EXPLAIN flag is found on the query */ |
| 13672 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 13673 | u8 declareVtab; /* True if inside sqlite3_declare_vtab() */ |
| @@ -13945,14 +13945,14 @@ | |
| 13945 | |
| 13946 | /* |
| 13947 | ** Context pointer passed down through the tree-walk. |
| 13948 | */ |
| 13949 | struct Walker { |
| 13950 | Parse *pParse; /* Parser context. */ |
| 13951 | int (*xExprCallback)(Walker*, Expr*); /* Callback for expressions */ |
| 13952 | int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */ |
| 13953 | void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */ |
| 13954 | int walkerDepth; /* Number of subqueries */ |
| 13955 | u8 eCode; /* A small processing code */ |
| 13956 | union { /* Extra data for callback */ |
| 13957 | NameContext *pNC; /* Naming context */ |
| 13958 | int n; /* A counter */ |
| @@ -22394,12 +22394,13 @@ | |
| 22394 | } |
| 22395 | return p; |
| 22396 | } |
| 22397 | |
| 22398 | /* |
| 22399 | ** Allocate memory, either lookaside (if possible) or heap. |
| 22400 | ** If the allocation fails, set the mallocFailed flag in |
| 22401 | ** the connection pointer. |
| 22402 | ** |
| 22403 | ** If db!=0 and db->mallocFailed is true (indicating a prior malloc |
| 22404 | ** failure on the same database connection) then always return 0. |
| 22405 | ** Hence for a particular database connection, once malloc starts |
| 22406 | ** failing, it fails consistently until mallocFailed is reset. |
| @@ -22411,12 +22412,12 @@ | |
| 22412 | ** if( b ) a[10] = 9; |
| 22413 | ** |
| 22414 | ** In other words, if a subsequent malloc (ex: "b") worked, it is assumed |
| 22415 | ** that all prior mallocs (ex: "a") worked too. |
| 22416 | */ |
| 22417 | static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n); |
| 22418 | SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, u64 n){ |
| 22419 | assert( db==0 || sqlite3_mutex_held(db->mutex) ); |
| 22420 | assert( db==0 || db->pnBytesFreed==0 ); |
| 22421 | #ifndef SQLITE_OMIT_LOOKASIDE |
| 22422 | if( db ){ |
| 22423 | LookasideSlot *pBuf; |
| @@ -22442,11 +22443,14 @@ | |
| 22443 | #else |
| 22444 | if( db && db->mallocFailed ){ |
| 22445 | return 0; |
| 22446 | } |
| 22447 | #endif |
| 22448 | return dbMallocRawFinish(db, n); |
| 22449 | } |
| 22450 | static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n){ |
| 22451 | void *p = sqlite3Malloc(n); |
| 22452 | if( !p && db ){ |
| 22453 | db->mallocFailed = 1; |
| 22454 | } |
| 22455 | sqlite3MemdebugSetType(p, |
| 22456 | (db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP); |
| @@ -62524,13 +62528,12 @@ | |
| 62528 | ** This must be done in advance. Once the balance starts, the cell |
| 62529 | ** offset section of the btree page will be overwritten and we will no |
| 62530 | ** long be able to find the cells if a pointer to each cell is not saved |
| 62531 | ** first. |
| 62532 | */ |
| 62533 | memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow)); |
| 62534 | if( pOld->nOverflow>0 ){ |
| 62535 | limit = pOld->aiOvfl[0]; |
| 62536 | for(j=0; j<limit; j++){ |
| 62537 | b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell)); |
| 62538 | piCell += 2; |
| 62539 | b.nCell++; |
| @@ -68390,11 +68393,12 @@ | |
| 68393 | VdbeOp *pOp; |
| 68394 | if( p->db->mallocFailed ) return 0; |
| 68395 | assert( addr>=0 && addr<p->nOp ); |
| 68396 | pOp = &p->aOp[addr]; |
| 68397 | freeP4(p->db, pOp->p4type, pOp->p4.p); |
| 68398 | pOp->p4type = P4_NOTUSED; |
| 68399 | pOp->p4.z = 0; |
| 68400 | pOp->opcode = OP_Noop; |
| 68401 | return 1; |
| 68402 | } |
| 68403 | |
| 68404 | /* |
| @@ -69438,11 +69442,10 @@ | |
| 69442 | do { |
| 69443 | nByte = 0; |
| 69444 | p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), zCsr, &nFree, &nByte); |
| 69445 | p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), zCsr, &nFree, &nByte); |
| 69446 | p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), zCsr, &nFree, &nByte); |
| 69447 | p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*), |
| 69448 | zCsr, &nFree, &nByte); |
| 69449 | p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, zCsr, &nFree, &nByte); |
| 69450 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 69451 | p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), zCsr, &nFree, &nByte); |
| @@ -69461,15 +69464,14 @@ | |
| 69464 | for(n=0; n<nVar; n++){ |
| 69465 | p->aVar[n].flags = MEM_Null; |
| 69466 | p->aVar[n].db = db; |
| 69467 | } |
| 69468 | } |
| 69469 | p->nzVar = pParse->nzVar; |
| 69470 | p->azVar = pParse->azVar; |
| 69471 | pParse->nzVar = 0; |
| 69472 | pParse->azVar = 0; |
| 69473 | if( p->aMem ){ |
| 69474 | p->aMem--; /* aMem[] goes from 1..nMem */ |
| 69475 | p->nMem = nMem; /* not from 0..nMem-1 */ |
| 69476 | for(n=1; n<=nMem; n++){ |
| 69477 | p->aMem[n].flags = MEM_Undefined; |
| @@ -70452,10 +70454,11 @@ | |
| 70454 | pNext = pSub->pNext; |
| 70455 | vdbeFreeOpArray(db, pSub->aOp, pSub->nOp); |
| 70456 | sqlite3DbFree(db, pSub); |
| 70457 | } |
| 70458 | for(i=p->nzVar-1; i>=0; i--) sqlite3DbFree(db, p->azVar[i]); |
| 70459 | sqlite3DbFree(db, p->azVar); |
| 70460 | vdbeFreeOpArray(db, p->aOp, p->nOp); |
| 70461 | sqlite3DbFree(db, p->aColName); |
| 70462 | sqlite3DbFree(db, p->zSql); |
| 70463 | sqlite3DbFree(db, p->pFree); |
| 70464 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| @@ -71196,13 +71199,13 @@ | |
| 71199 | v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc); |
| 71200 | n1 = v1==0 ? 0 : c1.n; |
| 71201 | v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc); |
| 71202 | n2 = v2==0 ? 0 : c2.n; |
| 71203 | rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2); |
| 71204 | if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM; |
| 71205 | sqlite3VdbeMemRelease(&c1); |
| 71206 | sqlite3VdbeMemRelease(&c2); |
| 71207 | return rc; |
| 71208 | } |
| 71209 | } |
| 71210 | |
| 71211 | /* |
| @@ -71986,15 +71989,17 @@ | |
| 71989 | ** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored |
| 71990 | ** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored |
| 71991 | ** in memory obtained from sqlite3DbMalloc). |
| 71992 | */ |
| 71993 | SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){ |
| 71994 | if( pVtab->zErrMsg ){ |
| 71995 | sqlite3 *db = p->db; |
| 71996 | sqlite3DbFree(db, p->zErrMsg); |
| 71997 | p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg); |
| 71998 | sqlite3_free(pVtab->zErrMsg); |
| 71999 | pVtab->zErrMsg = 0; |
| 72000 | } |
| 72001 | } |
| 72002 | #endif /* SQLITE_OMIT_VIRTUALTABLE */ |
| 72003 | |
| 72004 | /************** End of vdbeaux.c *********************************************/ |
| 72005 | /************** Begin file vdbeapi.c *****************************************/ |
| @@ -86034,14 +86039,16 @@ | |
| 86039 | pParse->nHeight += pExpr->nHeight; |
| 86040 | } |
| 86041 | #endif |
| 86042 | savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg); |
| 86043 | pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg); |
| 86044 | w.pParse = pNC->pParse; |
| 86045 | w.xExprCallback = resolveExprStep; |
| 86046 | w.xSelectCallback = resolveSelectStep; |
| 86047 | w.xSelectCallback2 = 0; |
| 86048 | w.walkerDepth = 0; |
| 86049 | w.eCode = 0; |
| 86050 | w.u.pNC = pNC; |
| 86051 | sqlite3WalkExpr(&w, pExpr); |
| 86052 | #if SQLITE_MAX_EXPR_DEPTH>0 |
| 86053 | pNC->pParse->nHeight -= pExpr->nHeight; |
| 86054 | #endif |
| @@ -100498,11 +100505,11 @@ | |
| 100505 | continue; |
| 100506 | } |
| 100507 | } |
| 100508 | c2 = Utf8Read(zString); |
| 100509 | if( c==c2 ) continue; |
| 100510 | if( noCase && c<0x80 && c2<0x80 && sqlite3Tolower(c)==sqlite3Tolower(c2) ){ |
| 100511 | continue; |
| 100512 | } |
| 100513 | if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue; |
| 100514 | return 0; |
| 100515 | } |
| @@ -121631,10 +121638,11 @@ | |
| 121638 | int cnt; /* Number of non-wildcard prefix characters */ |
| 121639 | char wc[3]; /* Wildcard characters */ |
| 121640 | sqlite3 *db = pParse->db; /* Database connection */ |
| 121641 | sqlite3_value *pVal = 0; |
| 121642 | int op; /* Opcode of pRight */ |
| 121643 | int rc; /* Result code to return */ |
| 121644 | |
| 121645 | if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){ |
| 121646 | return 0; |
| 121647 | } |
| 121648 | #ifdef SQLITE_EBCDIC |
| @@ -121696,12 +121704,13 @@ | |
| 121704 | }else{ |
| 121705 | z = 0; |
| 121706 | } |
| 121707 | } |
| 121708 | |
| 121709 | rc = (z!=0); |
| 121710 | sqlite3ValueFree(pVal); |
| 121711 | return rc; |
| 121712 | } |
| 121713 | #endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */ |
| 121714 | |
| 121715 | |
| 121716 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| @@ -183596,11 +183605,11 @@ | |
| 183605 | sqlite3_context *pCtx, /* Function call context */ |
| 183606 | int nArg, /* Number of args */ |
| 183607 | sqlite3_value **apVal /* Function arguments */ |
| 183608 | ){ |
| 183609 | assert( nArg==0 ); |
| 183610 | sqlite3_result_text(pCtx, "fts5: 2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1", -1, SQLITE_TRANSIENT); |
| 183611 | } |
| 183612 | |
| 183613 | static int fts5Init(sqlite3 *db){ |
| 183614 | static const sqlite3_module fts5Mod = { |
| 183615 | /* iVersion */ 2, |
| 183616 |
+1
-1
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -111,11 +111,11 @@ | ||
| 111 | 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | 113 | */ |
| 114 | 114 | #define SQLITE_VERSION "3.11.0" |
| 115 | 115 | #define SQLITE_VERSION_NUMBER 3011000 |
| 116 | -#define SQLITE_SOURCE_ID "2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5" | |
| 116 | +#define SQLITE_SOURCE_ID "2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1" | |
| 117 | 117 | |
| 118 | 118 | /* |
| 119 | 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | 121 | ** |
| 122 | 122 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -111,11 +111,11 @@ | |
| 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | */ |
| 114 | #define SQLITE_VERSION "3.11.0" |
| 115 | #define SQLITE_VERSION_NUMBER 3011000 |
| 116 | #define SQLITE_SOURCE_ID "2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5" |
| 117 | |
| 118 | /* |
| 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | ** |
| 122 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -111,11 +111,11 @@ | |
| 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | */ |
| 114 | #define SQLITE_VERSION "3.11.0" |
| 115 | #define SQLITE_VERSION_NUMBER 3011000 |
| 116 | #define SQLITE_SOURCE_ID "2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1" |
| 117 | |
| 118 | /* |
| 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | ** |
| 122 |
+20
-17
| --- src/statrep.c | ||
| +++ src/statrep.c | ||
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | /* |
| 2 | -** Copyright (c) 2013 Stephen Beal | |
| 2 | +** Copyright (c) 2013 Stephan Beal | |
| 3 | 3 | ** |
| 4 | 4 | ** This program is free software; you can redistribute it and/or |
| 5 | 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | 7 | |
| @@ -241,10 +241,11 @@ | ||
| 241 | 241 | rowClass = ++nRowNumber % 2; |
| 242 | 242 | @ <tr class='row%d(rowClass)'> |
| 243 | 243 | @ <td></td> |
| 244 | 244 | @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td> |
| 245 | 245 | @</tr> |
| 246 | + showYearTotal = 0; | |
| 246 | 247 | } |
| 247 | 248 | nEventsPerYear = 0; |
| 248 | 249 | memcpy(zPrevYear,zTimeframe,4); |
| 249 | 250 | rowClass = ++nRowNumber % 2; |
| 250 | 251 | @ <tr class='row%d(rowClass)'> |
| @@ -334,12 +335,12 @@ | ||
| 334 | 335 | all rows. */ |
| 335 | 336 | stats_report_init_view(); |
| 336 | 337 | @ <h1>Timeline Events |
| 337 | 338 | @ (%s(stats_report_label_for_type())) by User</h1> |
| 338 | 339 | db_multi_exec( |
| 339 | - "CREATE TEMP TABLE piechart(amt,label);" | |
| 340 | - "INSERT INTO piechart SELECT count(*), ifnull(euser,user) FROM v_reports" | |
| 340 | + "CREATE TEMP VIEW piechart(amt,label) AS" | |
| 341 | + " SELECT count(*), ifnull(euser,user) FROM v_reports" | |
| 341 | 342 | " GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;" |
| 342 | 343 | ); |
| 343 | 344 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 344 | 345 | @ <center><svg width=700 height=400> |
| 345 | 346 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| @@ -482,24 +483,26 @@ | ||
| 482 | 483 | if( zUserName ){ |
| 483 | 484 | @ for user %h(zUserName) |
| 484 | 485 | } |
| 485 | 486 | @ </h1> |
| 486 | 487 | db_multi_exec( |
| 487 | - "CREATE TEMP TABLE piechart(amt,label);" | |
| 488 | - "INSERT INTO piechart" | |
| 489 | - " SELECT count(*), cast(strftime('%%w', mtime) AS INT) FROM v_reports" | |
| 490 | - " WHERE ifnull(coalesce(euser,user,'')=%Q,1)" | |
| 491 | - " GROUP BY 2 ORDER BY 2;" | |
| 492 | - "UPDATE piechart SET label = CASE label" | |
| 493 | - " WHEN 0 THEN 'Sunday'" | |
| 494 | - " WHEN 1 THEN 'Monday'" | |
| 495 | - " WHEN 2 THEN 'Tuesday'" | |
| 496 | - " WHEN 3 THEN 'Wednesday'" | |
| 497 | - " WHEN 4 THEN 'Thursday'" | |
| 498 | - " WHEN 5 THEN 'Friday'" | |
| 499 | - " WHEN 6 THEN 'Saturday'" | |
| 500 | - " ELSE 'ERROR' END;", zUserName | |
| 488 | + "CREATE TEMP VIEW piechart(amt,label) AS" | |
| 489 | + " SELECT count(*)," | |
| 490 | + " CASE cast(strftime('%%w', mtime) AS INT)" | |
| 491 | + " WHEN 0 THEN 'Sunday'" | |
| 492 | + " WHEN 1 THEN 'Monday'" | |
| 493 | + " WHEN 2 THEN 'Tuesday'" | |
| 494 | + " WHEN 3 THEN 'Wednesday'" | |
| 495 | + " WHEN 4 THEN 'Thursday'" | |
| 496 | + " WHEN 5 THEN 'Friday'" | |
| 497 | + " WHEN 6 THEN 'Saturday'" | |
| 498 | + " ELSE 'ERROR'" | |
| 499 | + " END" | |
| 500 | + " FROM v_reports" | |
| 501 | + " WHERE ifnull(coalesce(euser,user,'')=%Q,1)" | |
| 502 | + " GROUP BY 2 ORDER BY cast(strftime('%%w', mtime) AS INT);" | |
| 503 | + , zUserName | |
| 501 | 504 | ); |
| 502 | 505 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 503 | 506 | @ <center><svg width=700 height=400> |
| 504 | 507 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| 505 | 508 | @ </svg></centre><hr/> |
| 506 | 509 |
| --- src/statrep.c | |
| +++ src/statrep.c | |
| @@ -1,7 +1,7 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2013 Stephen Beal |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | |
| @@ -241,10 +241,11 @@ | |
| 241 | rowClass = ++nRowNumber % 2; |
| 242 | @ <tr class='row%d(rowClass)'> |
| 243 | @ <td></td> |
| 244 | @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td> |
| 245 | @</tr> |
| 246 | } |
| 247 | nEventsPerYear = 0; |
| 248 | memcpy(zPrevYear,zTimeframe,4); |
| 249 | rowClass = ++nRowNumber % 2; |
| 250 | @ <tr class='row%d(rowClass)'> |
| @@ -334,12 +335,12 @@ | |
| 334 | all rows. */ |
| 335 | stats_report_init_view(); |
| 336 | @ <h1>Timeline Events |
| 337 | @ (%s(stats_report_label_for_type())) by User</h1> |
| 338 | db_multi_exec( |
| 339 | "CREATE TEMP TABLE piechart(amt,label);" |
| 340 | "INSERT INTO piechart SELECT count(*), ifnull(euser,user) FROM v_reports" |
| 341 | " GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;" |
| 342 | ); |
| 343 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 344 | @ <center><svg width=700 height=400> |
| 345 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| @@ -482,24 +483,26 @@ | |
| 482 | if( zUserName ){ |
| 483 | @ for user %h(zUserName) |
| 484 | } |
| 485 | @ </h1> |
| 486 | db_multi_exec( |
| 487 | "CREATE TEMP TABLE piechart(amt,label);" |
| 488 | "INSERT INTO piechart" |
| 489 | " SELECT count(*), cast(strftime('%%w', mtime) AS INT) FROM v_reports" |
| 490 | " WHERE ifnull(coalesce(euser,user,'')=%Q,1)" |
| 491 | " GROUP BY 2 ORDER BY 2;" |
| 492 | "UPDATE piechart SET label = CASE label" |
| 493 | " WHEN 0 THEN 'Sunday'" |
| 494 | " WHEN 1 THEN 'Monday'" |
| 495 | " WHEN 2 THEN 'Tuesday'" |
| 496 | " WHEN 3 THEN 'Wednesday'" |
| 497 | " WHEN 4 THEN 'Thursday'" |
| 498 | " WHEN 5 THEN 'Friday'" |
| 499 | " WHEN 6 THEN 'Saturday'" |
| 500 | " ELSE 'ERROR' END;", zUserName |
| 501 | ); |
| 502 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 503 | @ <center><svg width=700 height=400> |
| 504 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| 505 | @ </svg></centre><hr/> |
| 506 |
| --- src/statrep.c | |
| +++ src/statrep.c | |
| @@ -1,7 +1,7 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2013 Stephan Beal |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | |
| @@ -241,10 +241,11 @@ | |
| 241 | rowClass = ++nRowNumber % 2; |
| 242 | @ <tr class='row%d(rowClass)'> |
| 243 | @ <td></td> |
| 244 | @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td> |
| 245 | @</tr> |
| 246 | showYearTotal = 0; |
| 247 | } |
| 248 | nEventsPerYear = 0; |
| 249 | memcpy(zPrevYear,zTimeframe,4); |
| 250 | rowClass = ++nRowNumber % 2; |
| 251 | @ <tr class='row%d(rowClass)'> |
| @@ -334,12 +335,12 @@ | |
| 335 | all rows. */ |
| 336 | stats_report_init_view(); |
| 337 | @ <h1>Timeline Events |
| 338 | @ (%s(stats_report_label_for_type())) by User</h1> |
| 339 | db_multi_exec( |
| 340 | "CREATE TEMP VIEW piechart(amt,label) AS" |
| 341 | " SELECT count(*), ifnull(euser,user) FROM v_reports" |
| 342 | " GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;" |
| 343 | ); |
| 344 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 345 | @ <center><svg width=700 height=400> |
| 346 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| @@ -482,24 +483,26 @@ | |
| 483 | if( zUserName ){ |
| 484 | @ for user %h(zUserName) |
| 485 | } |
| 486 | @ </h1> |
| 487 | db_multi_exec( |
| 488 | "CREATE TEMP VIEW piechart(amt,label) AS" |
| 489 | " SELECT count(*)," |
| 490 | " CASE cast(strftime('%%w', mtime) AS INT)" |
| 491 | " WHEN 0 THEN 'Sunday'" |
| 492 | " WHEN 1 THEN 'Monday'" |
| 493 | " WHEN 2 THEN 'Tuesday'" |
| 494 | " WHEN 3 THEN 'Wednesday'" |
| 495 | " WHEN 4 THEN 'Thursday'" |
| 496 | " WHEN 5 THEN 'Friday'" |
| 497 | " WHEN 6 THEN 'Saturday'" |
| 498 | " ELSE 'ERROR'" |
| 499 | " END" |
| 500 | " FROM v_reports" |
| 501 | " WHERE ifnull(coalesce(euser,user,'')=%Q,1)" |
| 502 | " GROUP BY 2 ORDER BY cast(strftime('%%w', mtime) AS INT);" |
| 503 | , zUserName |
| 504 | ); |
| 505 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 506 | @ <center><svg width=700 height=400> |
| 507 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| 508 | @ </svg></centre><hr/> |
| 509 |
+2
-2
| --- src/th_lang.c | ||
| +++ src/th_lang.c | ||
| @@ -990,11 +990,11 @@ | ||
| 990 | 990 | } |
| 991 | 991 | |
| 992 | 992 | /* |
| 993 | 993 | ** TH Syntax: |
| 994 | 994 | ** |
| 995 | -** array names | |
| 995 | +** array names VARNAME | |
| 996 | 996 | */ |
| 997 | 997 | static int array_names_command( |
| 998 | 998 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| 999 | 999 | ){ |
| 1000 | 1000 | int rc; |
| @@ -1014,11 +1014,11 @@ | ||
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | 1016 | /* |
| 1017 | 1017 | ** TH Syntax: |
| 1018 | 1018 | ** |
| 1019 | -** unset VAR | |
| 1019 | +** unset VARNAME | |
| 1020 | 1020 | */ |
| 1021 | 1021 | static int unset_command( |
| 1022 | 1022 | Th_Interp *interp, |
| 1023 | 1023 | void *ctx, |
| 1024 | 1024 | int argc, |
| 1025 | 1025 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -990,11 +990,11 @@ | |
| 990 | } |
| 991 | |
| 992 | /* |
| 993 | ** TH Syntax: |
| 994 | ** |
| 995 | ** array names |
| 996 | */ |
| 997 | static int array_names_command( |
| 998 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| 999 | ){ |
| 1000 | int rc; |
| @@ -1014,11 +1014,11 @@ | |
| 1014 | } |
| 1015 | |
| 1016 | /* |
| 1017 | ** TH Syntax: |
| 1018 | ** |
| 1019 | ** unset VAR |
| 1020 | */ |
| 1021 | static int unset_command( |
| 1022 | Th_Interp *interp, |
| 1023 | void *ctx, |
| 1024 | int argc, |
| 1025 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -990,11 +990,11 @@ | |
| 990 | } |
| 991 | |
| 992 | /* |
| 993 | ** TH Syntax: |
| 994 | ** |
| 995 | ** array names VARNAME |
| 996 | */ |
| 997 | static int array_names_command( |
| 998 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| 999 | ){ |
| 1000 | int rc; |
| @@ -1014,11 +1014,11 @@ | |
| 1014 | } |
| 1015 | |
| 1016 | /* |
| 1017 | ** TH Syntax: |
| 1018 | ** |
| 1019 | ** unset VARNAME |
| 1020 | */ |
| 1021 | static int unset_command( |
| 1022 | Th_Interp *interp, |
| 1023 | void *ctx, |
| 1024 | int argc, |
| 1025 |
+48
-3
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -2291,11 +2291,11 @@ | ||
| 2291 | 2291 | ** --http Include an HTTP response header in the output |
| 2292 | 2292 | ** --open-config Open the configuration database |
| 2293 | 2293 | ** --th-trace Trace TH1 execution (for debugging purposes) |
| 2294 | 2294 | */ |
| 2295 | 2295 | void test_th_render(void){ |
| 2296 | - int forceCgi = 0, fullHttpReply = 0; | |
| 2296 | + int forceCgi, fullHttpReply; | |
| 2297 | 2297 | Blob in; |
| 2298 | 2298 | Th_InitTraceLog(); |
| 2299 | 2299 | forceCgi = find_option("cgi", 0, 0)!=0; |
| 2300 | 2300 | fullHttpReply = find_option("http", 0, 0)!=0; |
| 2301 | 2301 | if( fullHttpReply ) forceCgi = 1; |
| @@ -2318,11 +2318,11 @@ | ||
| 2318 | 2318 | ** COMMAND: test-th-eval |
| 2319 | 2319 | ** |
| 2320 | 2320 | ** Usage: %fossil test-th-eval SCRIPT |
| 2321 | 2321 | ** |
| 2322 | 2322 | ** Evaluate SCRIPT as if it were a header or footer or ticket rendering |
| 2323 | -** script, evaluate it, and show the results on standard output. | |
| 2323 | +** script and show the results on standard output. | |
| 2324 | 2324 | ** |
| 2325 | 2325 | ** Options: |
| 2326 | 2326 | ** |
| 2327 | 2327 | ** --cgi Include a CGI response header in the output |
| 2328 | 2328 | ** --http Include an HTTP response header in the output |
| @@ -2339,15 +2339,59 @@ | ||
| 2339 | 2339 | if( fullHttpReply ) forceCgi = 1; |
| 2340 | 2340 | if( forceCgi ) Th_ForceCgi(fullHttpReply); |
| 2341 | 2341 | if( find_option("open-config", 0, 0)!=0 ){ |
| 2342 | 2342 | Th_OpenConfig(1); |
| 2343 | 2343 | } |
| 2344 | + verify_all_options(); | |
| 2344 | 2345 | if( g.argc!=3 ){ |
| 2345 | 2346 | usage("script"); |
| 2346 | 2347 | } |
| 2347 | 2348 | Th_FossilInit(TH_INIT_DEFAULT); |
| 2348 | 2349 | rc = Th_Eval(g.interp, 0, g.argv[2], -1); |
| 2350 | + zRc = Th_ReturnCodeName(rc, 1); | |
| 2351 | + fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0)); | |
| 2352 | + Th_PrintTraceLog(); | |
| 2353 | + if( forceCgi ) cgi_reply(); | |
| 2354 | +} | |
| 2355 | + | |
| 2356 | +/* | |
| 2357 | +** COMMAND: test-th-source | |
| 2358 | +** | |
| 2359 | +** Usage: %fossil test-th-source FILE | |
| 2360 | +** | |
| 2361 | +** Evaluate the contents of the file named "FILE" as if it were a header | |
| 2362 | +** or footer or ticket rendering script and show the results on standard | |
| 2363 | +** output. | |
| 2364 | +** | |
| 2365 | +** Options: | |
| 2366 | +** | |
| 2367 | +** --cgi Include a CGI response header in the output | |
| 2368 | +** --http Include an HTTP response header in the output | |
| 2369 | +** --open-config Open the configuration database | |
| 2370 | +** --th-trace Trace TH1 execution (for debugging purposes) | |
| 2371 | +*/ | |
| 2372 | +void test_th_source(void){ | |
| 2373 | + int rc; | |
| 2374 | + const char *zRc; | |
| 2375 | + int forceCgi, fullHttpReply; | |
| 2376 | + Blob in; | |
| 2377 | + Th_InitTraceLog(); | |
| 2378 | + forceCgi = find_option("cgi", 0, 0)!=0; | |
| 2379 | + fullHttpReply = find_option("http", 0, 0)!=0; | |
| 2380 | + if( fullHttpReply ) forceCgi = 1; | |
| 2381 | + if( forceCgi ) Th_ForceCgi(fullHttpReply); | |
| 2382 | + if( find_option("open-config", 0, 0)!=0 ){ | |
| 2383 | + Th_OpenConfig(1); | |
| 2384 | + } | |
| 2385 | + verify_all_options(); | |
| 2386 | + if( g.argc!=3 ){ | |
| 2387 | + usage("file"); | |
| 2388 | + } | |
| 2389 | + blob_zero(&in); | |
| 2390 | + blob_read_from_file(&in, g.argv[2]); | |
| 2391 | + Th_FossilInit(TH_INIT_DEFAULT); | |
| 2392 | + rc = Th_Eval(g.interp, 0, blob_str(&in), -1); | |
| 2349 | 2393 | zRc = Th_ReturnCodeName(rc, 1); |
| 2350 | 2394 | fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0)); |
| 2351 | 2395 | Th_PrintTraceLog(); |
| 2352 | 2396 | if( forceCgi ) cgi_reply(); |
| 2353 | 2397 | } |
| @@ -2356,11 +2400,11 @@ | ||
| 2356 | 2400 | /* |
| 2357 | 2401 | ** COMMAND: test-th-hook |
| 2358 | 2402 | ** |
| 2359 | 2403 | ** Usage: %fossil test-th-hook TYPE NAME FLAGS |
| 2360 | 2404 | ** |
| 2361 | -** Executes the TH1 script configured for the pre-operation (i.e. a command | |
| 2405 | +** Evaluates the TH1 script configured for the pre-operation (i.e. a command | |
| 2362 | 2406 | ** or web page) "hook" or post-operation "notification". The results of the |
| 2363 | 2407 | ** script evaluation, if any, will be printed to the standard output channel. |
| 2364 | 2408 | ** The NAME argument must be the name of a command or web page; however, it |
| 2365 | 2409 | ** does not necessarily have to be a command or web page that is normally |
| 2366 | 2410 | ** recognized by Fossil. The FLAGS argument will be used to set the value |
| @@ -2397,10 +2441,11 @@ | ||
| 2397 | 2441 | Th_InitTraceLog(); |
| 2398 | 2442 | forceCgi = find_option("cgi", 0, 0)!=0; |
| 2399 | 2443 | fullHttpReply = find_option("http", 0, 0)!=0; |
| 2400 | 2444 | if( fullHttpReply ) forceCgi = 1; |
| 2401 | 2445 | if( forceCgi ) Th_ForceCgi(fullHttpReply); |
| 2446 | + verify_all_options(); | |
| 2402 | 2447 | if( g.argc<5 ){ |
| 2403 | 2448 | usage("TYPE NAME FLAGS"); |
| 2404 | 2449 | } |
| 2405 | 2450 | if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){ |
| 2406 | 2451 | rc = Th_CommandHook(g.argv[3], (char)atoi(g.argv[4])); |
| 2407 | 2452 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -2291,11 +2291,11 @@ | |
| 2291 | ** --http Include an HTTP response header in the output |
| 2292 | ** --open-config Open the configuration database |
| 2293 | ** --th-trace Trace TH1 execution (for debugging purposes) |
| 2294 | */ |
| 2295 | void test_th_render(void){ |
| 2296 | int forceCgi = 0, fullHttpReply = 0; |
| 2297 | Blob in; |
| 2298 | Th_InitTraceLog(); |
| 2299 | forceCgi = find_option("cgi", 0, 0)!=0; |
| 2300 | fullHttpReply = find_option("http", 0, 0)!=0; |
| 2301 | if( fullHttpReply ) forceCgi = 1; |
| @@ -2318,11 +2318,11 @@ | |
| 2318 | ** COMMAND: test-th-eval |
| 2319 | ** |
| 2320 | ** Usage: %fossil test-th-eval SCRIPT |
| 2321 | ** |
| 2322 | ** Evaluate SCRIPT as if it were a header or footer or ticket rendering |
| 2323 | ** script, evaluate it, and show the results on standard output. |
| 2324 | ** |
| 2325 | ** Options: |
| 2326 | ** |
| 2327 | ** --cgi Include a CGI response header in the output |
| 2328 | ** --http Include an HTTP response header in the output |
| @@ -2339,15 +2339,59 @@ | |
| 2339 | if( fullHttpReply ) forceCgi = 1; |
| 2340 | if( forceCgi ) Th_ForceCgi(fullHttpReply); |
| 2341 | if( find_option("open-config", 0, 0)!=0 ){ |
| 2342 | Th_OpenConfig(1); |
| 2343 | } |
| 2344 | if( g.argc!=3 ){ |
| 2345 | usage("script"); |
| 2346 | } |
| 2347 | Th_FossilInit(TH_INIT_DEFAULT); |
| 2348 | rc = Th_Eval(g.interp, 0, g.argv[2], -1); |
| 2349 | zRc = Th_ReturnCodeName(rc, 1); |
| 2350 | fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0)); |
| 2351 | Th_PrintTraceLog(); |
| 2352 | if( forceCgi ) cgi_reply(); |
| 2353 | } |
| @@ -2356,11 +2400,11 @@ | |
| 2356 | /* |
| 2357 | ** COMMAND: test-th-hook |
| 2358 | ** |
| 2359 | ** Usage: %fossil test-th-hook TYPE NAME FLAGS |
| 2360 | ** |
| 2361 | ** Executes the TH1 script configured for the pre-operation (i.e. a command |
| 2362 | ** or web page) "hook" or post-operation "notification". The results of the |
| 2363 | ** script evaluation, if any, will be printed to the standard output channel. |
| 2364 | ** The NAME argument must be the name of a command or web page; however, it |
| 2365 | ** does not necessarily have to be a command or web page that is normally |
| 2366 | ** recognized by Fossil. The FLAGS argument will be used to set the value |
| @@ -2397,10 +2441,11 @@ | |
| 2397 | Th_InitTraceLog(); |
| 2398 | forceCgi = find_option("cgi", 0, 0)!=0; |
| 2399 | fullHttpReply = find_option("http", 0, 0)!=0; |
| 2400 | if( fullHttpReply ) forceCgi = 1; |
| 2401 | if( forceCgi ) Th_ForceCgi(fullHttpReply); |
| 2402 | if( g.argc<5 ){ |
| 2403 | usage("TYPE NAME FLAGS"); |
| 2404 | } |
| 2405 | if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){ |
| 2406 | rc = Th_CommandHook(g.argv[3], (char)atoi(g.argv[4])); |
| 2407 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -2291,11 +2291,11 @@ | |
| 2291 | ** --http Include an HTTP response header in the output |
| 2292 | ** --open-config Open the configuration database |
| 2293 | ** --th-trace Trace TH1 execution (for debugging purposes) |
| 2294 | */ |
| 2295 | void test_th_render(void){ |
| 2296 | int forceCgi, fullHttpReply; |
| 2297 | Blob in; |
| 2298 | Th_InitTraceLog(); |
| 2299 | forceCgi = find_option("cgi", 0, 0)!=0; |
| 2300 | fullHttpReply = find_option("http", 0, 0)!=0; |
| 2301 | if( fullHttpReply ) forceCgi = 1; |
| @@ -2318,11 +2318,11 @@ | |
| 2318 | ** COMMAND: test-th-eval |
| 2319 | ** |
| 2320 | ** Usage: %fossil test-th-eval SCRIPT |
| 2321 | ** |
| 2322 | ** Evaluate SCRIPT as if it were a header or footer or ticket rendering |
| 2323 | ** script and show the results on standard output. |
| 2324 | ** |
| 2325 | ** Options: |
| 2326 | ** |
| 2327 | ** --cgi Include a CGI response header in the output |
| 2328 | ** --http Include an HTTP response header in the output |
| @@ -2339,15 +2339,59 @@ | |
| 2339 | if( fullHttpReply ) forceCgi = 1; |
| 2340 | if( forceCgi ) Th_ForceCgi(fullHttpReply); |
| 2341 | if( find_option("open-config", 0, 0)!=0 ){ |
| 2342 | Th_OpenConfig(1); |
| 2343 | } |
| 2344 | verify_all_options(); |
| 2345 | if( g.argc!=3 ){ |
| 2346 | usage("script"); |
| 2347 | } |
| 2348 | Th_FossilInit(TH_INIT_DEFAULT); |
| 2349 | rc = Th_Eval(g.interp, 0, g.argv[2], -1); |
| 2350 | zRc = Th_ReturnCodeName(rc, 1); |
| 2351 | fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0)); |
| 2352 | Th_PrintTraceLog(); |
| 2353 | if( forceCgi ) cgi_reply(); |
| 2354 | } |
| 2355 | |
| 2356 | /* |
| 2357 | ** COMMAND: test-th-source |
| 2358 | ** |
| 2359 | ** Usage: %fossil test-th-source FILE |
| 2360 | ** |
| 2361 | ** Evaluate the contents of the file named "FILE" as if it were a header |
| 2362 | ** or footer or ticket rendering script and show the results on standard |
| 2363 | ** output. |
| 2364 | ** |
| 2365 | ** Options: |
| 2366 | ** |
| 2367 | ** --cgi Include a CGI response header in the output |
| 2368 | ** --http Include an HTTP response header in the output |
| 2369 | ** --open-config Open the configuration database |
| 2370 | ** --th-trace Trace TH1 execution (for debugging purposes) |
| 2371 | */ |
| 2372 | void test_th_source(void){ |
| 2373 | int rc; |
| 2374 | const char *zRc; |
| 2375 | int forceCgi, fullHttpReply; |
| 2376 | Blob in; |
| 2377 | Th_InitTraceLog(); |
| 2378 | forceCgi = find_option("cgi", 0, 0)!=0; |
| 2379 | fullHttpReply = find_option("http", 0, 0)!=0; |
| 2380 | if( fullHttpReply ) forceCgi = 1; |
| 2381 | if( forceCgi ) Th_ForceCgi(fullHttpReply); |
| 2382 | if( find_option("open-config", 0, 0)!=0 ){ |
| 2383 | Th_OpenConfig(1); |
| 2384 | } |
| 2385 | verify_all_options(); |
| 2386 | if( g.argc!=3 ){ |
| 2387 | usage("file"); |
| 2388 | } |
| 2389 | blob_zero(&in); |
| 2390 | blob_read_from_file(&in, g.argv[2]); |
| 2391 | Th_FossilInit(TH_INIT_DEFAULT); |
| 2392 | rc = Th_Eval(g.interp, 0, blob_str(&in), -1); |
| 2393 | zRc = Th_ReturnCodeName(rc, 1); |
| 2394 | fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0)); |
| 2395 | Th_PrintTraceLog(); |
| 2396 | if( forceCgi ) cgi_reply(); |
| 2397 | } |
| @@ -2356,11 +2400,11 @@ | |
| 2400 | /* |
| 2401 | ** COMMAND: test-th-hook |
| 2402 | ** |
| 2403 | ** Usage: %fossil test-th-hook TYPE NAME FLAGS |
| 2404 | ** |
| 2405 | ** Evaluates the TH1 script configured for the pre-operation (i.e. a command |
| 2406 | ** or web page) "hook" or post-operation "notification". The results of the |
| 2407 | ** script evaluation, if any, will be printed to the standard output channel. |
| 2408 | ** The NAME argument must be the name of a command or web page; however, it |
| 2409 | ** does not necessarily have to be a command or web page that is normally |
| 2410 | ** recognized by Fossil. The FLAGS argument will be used to set the value |
| @@ -2397,10 +2441,11 @@ | |
| 2441 | Th_InitTraceLog(); |
| 2442 | forceCgi = find_option("cgi", 0, 0)!=0; |
| 2443 | fullHttpReply = find_option("http", 0, 0)!=0; |
| 2444 | if( fullHttpReply ) forceCgi = 1; |
| 2445 | if( forceCgi ) Th_ForceCgi(fullHttpReply); |
| 2446 | verify_all_options(); |
| 2447 | if( g.argc<5 ){ |
| 2448 | usage("TYPE NAME FLAGS"); |
| 2449 | } |
| 2450 | if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){ |
| 2451 | rc = Th_CommandHook(g.argv[3], (char)atoi(g.argv[4])); |
| 2452 |
+1
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1517,11 +1517,11 @@ | ||
| 1517 | 1517 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1518 | 1518 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1519 | 1519 | } |
| 1520 | 1520 | }else{ |
| 1521 | 1521 | /* Otherwise, a timeline based on a span of time */ |
| 1522 | - int n, nBefore, nAfter; | |
| 1522 | + int n; | |
| 1523 | 1523 | const char *zEType = "timeline item"; |
| 1524 | 1524 | char *zDate; |
| 1525 | 1525 | Blob cond; |
| 1526 | 1526 | blob_zero(&cond); |
| 1527 | 1527 | if( zUses ){ |
| 1528 | 1528 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1517,11 +1517,11 @@ | |
| 1517 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1518 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1519 | } |
| 1520 | }else{ |
| 1521 | /* Otherwise, a timeline based on a span of time */ |
| 1522 | int n, nBefore, nAfter; |
| 1523 | const char *zEType = "timeline item"; |
| 1524 | char *zDate; |
| 1525 | Blob cond; |
| 1526 | blob_zero(&cond); |
| 1527 | if( zUses ){ |
| 1528 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1517,11 +1517,11 @@ | |
| 1517 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1518 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1519 | } |
| 1520 | }else{ |
| 1521 | /* Otherwise, a timeline based on a span of time */ |
| 1522 | int n; |
| 1523 | const char *zEType = "timeline item"; |
| 1524 | char *zDate; |
| 1525 | Blob cond; |
| 1526 | blob_zero(&cond); |
| 1527 | if( zUses ){ |
| 1528 |
+1
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1517,11 +1517,11 @@ | ||
| 1517 | 1517 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1518 | 1518 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1519 | 1519 | } |
| 1520 | 1520 | }else{ |
| 1521 | 1521 | /* Otherwise, a timeline based on a span of time */ |
| 1522 | - int n, nBefore, nAfter; | |
| 1522 | + int n; | |
| 1523 | 1523 | const char *zEType = "timeline item"; |
| 1524 | 1524 | char *zDate; |
| 1525 | 1525 | Blob cond; |
| 1526 | 1526 | blob_zero(&cond); |
| 1527 | 1527 | if( zUses ){ |
| 1528 | 1528 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1517,11 +1517,11 @@ | |
| 1517 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1518 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1519 | } |
| 1520 | }else{ |
| 1521 | /* Otherwise, a timeline based on a span of time */ |
| 1522 | int n, nBefore, nAfter; |
| 1523 | const char *zEType = "timeline item"; |
| 1524 | char *zDate; |
| 1525 | Blob cond; |
| 1526 | blob_zero(&cond); |
| 1527 | if( zUses ){ |
| 1528 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1517,11 +1517,11 @@ | |
| 1517 | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ |
| 1518 | timeline_submenu(&url, "Unhide", "unhide", "", 0); |
| 1519 | } |
| 1520 | }else{ |
| 1521 | /* Otherwise, a timeline based on a span of time */ |
| 1522 | int n; |
| 1523 | const char *zEType = "timeline item"; |
| 1524 | char *zDate; |
| 1525 | Blob cond; |
| 1526 | blob_zero(&cond); |
| 1527 | if( zUses ){ |
| 1528 |
+16
| --- test/amend.test | ||
| +++ test/amend.test | ||
| @@ -1,6 +1,22 @@ | ||
| 1 | 1 | # |
| 2 | +# Copyright (c) 2015 D. Richard Hipp | |
| 3 | +# | |
| 4 | +# This program is free software; you can redistribute it and/or | |
| 5 | +# modify it under the terms of the Simplified BSD License (also | |
| 6 | +# known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | +# | |
| 8 | +# This program is distributed in the hope that it will be useful, | |
| 9 | +# but without any warranty; without even the implied warranty of | |
| 10 | +# merchantability or fitness for a particular purpose. | |
| 11 | +# | |
| 12 | +# Author contact information: | |
| 13 | +# [email protected] | |
| 14 | +# http://www.hwaci.com/drh/ | |
| 15 | +# | |
| 16 | +############################################################################ | |
| 17 | +# | |
| 2 | 18 | # Tests for the "amend" command. |
| 3 | 19 | # |
| 4 | 20 | |
| 5 | 21 | proc short_uuid {uuid {len 10}} { |
| 6 | 22 | string range $uuid 0 $len-1 |
| 7 | 23 |
| --- test/amend.test | |
| +++ test/amend.test | |
| @@ -1,6 +1,22 @@ | |
| 1 | # |
| 2 | # Tests for the "amend" command. |
| 3 | # |
| 4 | |
| 5 | proc short_uuid {uuid {len 10}} { |
| 6 | string range $uuid 0 $len-1 |
| 7 |
| --- test/amend.test | |
| +++ test/amend.test | |
| @@ -1,6 +1,22 @@ | |
| 1 | # |
| 2 | # Copyright (c) 2015 D. Richard Hipp |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or |
| 5 | # modify it under the terms of the Simplified BSD License (also |
| 6 | # known as the "2-Clause License" or "FreeBSD License".) |
| 7 | # |
| 8 | # This program is distributed in the hope that it will be useful, |
| 9 | # but without any warranty; without even the implied warranty of |
| 10 | # merchantability or fitness for a particular purpose. |
| 11 | # |
| 12 | # Author contact information: |
| 13 | # [email protected] |
| 14 | # http://www.hwaci.com/drh/ |
| 15 | # |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # Tests for the "amend" command. |
| 19 | # |
| 20 | |
| 21 | proc short_uuid {uuid {len 10}} { |
| 22 | string range $uuid 0 $len-1 |
| 23 |
+1
-1
| --- test/merge6.test | ||
| +++ test/merge6.test | ||
| @@ -62,6 +62,6 @@ | ||
| 62 | 62 | fossil ls |
| 63 | 63 | |
| 64 | 64 | test merge_multi-4 {[normalize_result] eq {f1 |
| 65 | 65 | f2 |
| 66 | 66 | f3 |
| 67 | -f4}} | |
| 67 | +f4}} knownBug | |
| 68 | 68 |
| --- test/merge6.test | |
| +++ test/merge6.test | |
| @@ -62,6 +62,6 @@ | |
| 62 | fossil ls |
| 63 | |
| 64 | test merge_multi-4 {[normalize_result] eq {f1 |
| 65 | f2 |
| 66 | f3 |
| 67 | f4}} |
| 68 |
| --- test/merge6.test | |
| +++ test/merge6.test | |
| @@ -62,6 +62,6 @@ | |
| 62 | fossil ls |
| 63 | |
| 64 | test merge_multi-4 {[normalize_result] eq {f1 |
| 65 | f2 |
| 66 | f3 |
| 67 | f4}} knownBug |
| 68 |
+3
-3
| --- test/merge_renames.test | ||
| +++ test/merge_renames.test | ||
| @@ -156,13 +156,13 @@ | ||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | if {$deletes!=0} { |
| 159 | 159 | # failed |
| 160 | 160 | protOut "Error, the merge should not delete any file" |
| 161 | - test merge_renames-2 0 | |
| 161 | + test merge_renames-3 0 | |
| 162 | 162 | } else { |
| 163 | - test merge_renames-2 1 | |
| 163 | + test merge_renames-3 1 | |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | ###################################### |
| 167 | 167 | # Test 4 # |
| 168 | 168 | # Reported: Ticket [67176c3aa4] # |
| @@ -198,14 +198,14 @@ | ||
| 198 | 198 | |
| 199 | 199 | fossil ls |
| 200 | 200 | |
| 201 | 201 | test merge_renames-5 {[normalize_result] eq {f1 |
| 202 | 202 | f2 |
| 203 | -f3}} | |
| 203 | +f3}} knownBug | |
| 204 | 204 | |
| 205 | 205 | ###################################### |
| 206 | 206 | # |
| 207 | 207 | # Tests for troubles not specifically linked with renames but that I'd like to |
| 208 | 208 | # write: |
| 209 | 209 | # [c26c63eb1b] - 'merge --backout' does not handle conflicts properly |
| 210 | 210 | # [953031915f] - Lack of warning when overwriting extra files |
| 211 | 211 | # [4df5f38f1e] - Troubles merging a file delete with a file change |
| 212 | 212 |
| --- test/merge_renames.test | |
| +++ test/merge_renames.test | |
| @@ -156,13 +156,13 @@ | |
| 156 | } |
| 157 | |
| 158 | if {$deletes!=0} { |
| 159 | # failed |
| 160 | protOut "Error, the merge should not delete any file" |
| 161 | test merge_renames-2 0 |
| 162 | } else { |
| 163 | test merge_renames-2 1 |
| 164 | } |
| 165 | |
| 166 | ###################################### |
| 167 | # Test 4 # |
| 168 | # Reported: Ticket [67176c3aa4] # |
| @@ -198,14 +198,14 @@ | |
| 198 | |
| 199 | fossil ls |
| 200 | |
| 201 | test merge_renames-5 {[normalize_result] eq {f1 |
| 202 | f2 |
| 203 | f3}} |
| 204 | |
| 205 | ###################################### |
| 206 | # |
| 207 | # Tests for troubles not specifically linked with renames but that I'd like to |
| 208 | # write: |
| 209 | # [c26c63eb1b] - 'merge --backout' does not handle conflicts properly |
| 210 | # [953031915f] - Lack of warning when overwriting extra files |
| 211 | # [4df5f38f1e] - Troubles merging a file delete with a file change |
| 212 |
| --- test/merge_renames.test | |
| +++ test/merge_renames.test | |
| @@ -156,13 +156,13 @@ | |
| 156 | } |
| 157 | |
| 158 | if {$deletes!=0} { |
| 159 | # failed |
| 160 | protOut "Error, the merge should not delete any file" |
| 161 | test merge_renames-3 0 |
| 162 | } else { |
| 163 | test merge_renames-3 1 |
| 164 | } |
| 165 | |
| 166 | ###################################### |
| 167 | # Test 4 # |
| 168 | # Reported: Ticket [67176c3aa4] # |
| @@ -198,14 +198,14 @@ | |
| 198 | |
| 199 | fossil ls |
| 200 | |
| 201 | test merge_renames-5 {[normalize_result] eq {f1 |
| 202 | f2 |
| 203 | f3}} knownBug |
| 204 | |
| 205 | ###################################### |
| 206 | # |
| 207 | # Tests for troubles not specifically linked with renames but that I'd like to |
| 208 | # write: |
| 209 | # [c26c63eb1b] - 'merge --backout' does not handle conflicts properly |
| 210 | # [953031915f] - Lack of warning when overwriting extra files |
| 211 | # [4df5f38f1e] - Troubles merging a file delete with a file change |
| 212 |
+17
| --- test/revert.test | ||
| +++ test/revert.test | ||
| @@ -1,5 +1,22 @@ | ||
| 1 | +# | |
| 2 | +# Copyright (c) 2013 D. Richard Hipp | |
| 3 | +# | |
| 4 | +# This program is free software; you can redistribute it and/or | |
| 5 | +# modify it under the terms of the Simplified BSD License (also | |
| 6 | +# known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | +# | |
| 8 | +# This program is distributed in the hope that it will be useful, | |
| 9 | +# but without any warranty; without even the implied warranty of | |
| 10 | +# merchantability or fitness for a particular purpose. | |
| 11 | +# | |
| 12 | +# Author contact information: | |
| 13 | +# [email protected] | |
| 14 | +# http://www.hwaci.com/drh/ | |
| 15 | +# | |
| 16 | +############################################################################ | |
| 17 | +# | |
| 1 | 18 | # |
| 2 | 19 | # Tests for 'fossil revert' |
| 3 | 20 | # |
| 4 | 21 | # |
| 5 | 22 | |
| 6 | 23 |
| --- test/revert.test | |
| +++ test/revert.test | |
| @@ -1,5 +1,22 @@ | |
| 1 | # |
| 2 | # Tests for 'fossil revert' |
| 3 | # |
| 4 | # |
| 5 | |
| 6 |
| --- test/revert.test | |
| +++ test/revert.test | |
| @@ -1,5 +1,22 @@ | |
| 1 | # |
| 2 | # Copyright (c) 2013 D. Richard Hipp |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or |
| 5 | # modify it under the terms of the Simplified BSD License (also |
| 6 | # known as the "2-Clause License" or "FreeBSD License".) |
| 7 | # |
| 8 | # This program is distributed in the hope that it will be useful, |
| 9 | # but without any warranty; without even the implied warranty of |
| 10 | # merchantability or fitness for a particular purpose. |
| 11 | # |
| 12 | # Author contact information: |
| 13 | # [email protected] |
| 14 | # http://www.hwaci.com/drh/ |
| 15 | # |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # |
| 19 | # Tests for 'fossil revert' |
| 20 | # |
| 21 | # |
| 22 | |
| 23 |
+35
-9
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -58,10 +58,18 @@ | ||
| 58 | 58 | set QUIET 1 |
| 59 | 59 | set argv [lreplace $argv $i $i] |
| 60 | 60 | } else { |
| 61 | 61 | set QUIET 0 |
| 62 | 62 | } |
| 63 | + | |
| 64 | +set i [lsearch $argv -strict] | |
| 65 | +if {$i>=0} { | |
| 66 | + set STRICT 1 | |
| 67 | + set argv [lreplace $argv $i $i] | |
| 68 | +} else { | |
| 69 | + set STRICT 0 | |
| 70 | +} | |
| 63 | 71 | |
| 64 | 72 | if {[llength $argv]==0} { |
| 65 | 73 | foreach f [lsort [glob $testdir/*.test]] { |
| 66 | 74 | set base [file root [file tail $f]] |
| 67 | 75 | lappend argv $base |
| @@ -327,24 +335,35 @@ | ||
| 327 | 335 | } |
| 328 | 336 | |
| 329 | 337 | # Perform a test |
| 330 | 338 | # |
| 331 | 339 | set test_count 0 |
| 332 | -proc test {name expr} { | |
| 333 | - global bad_test test_count RESULT | |
| 340 | +proc test {name expr {constraints ""}} { | |
| 341 | + global bad_test ignored_test test_count RESULT | |
| 334 | 342 | incr test_count |
| 343 | + set knownBug [expr {"knownBug" in $constraints}] | |
| 335 | 344 | set r [uplevel 1 [list expr $expr]] |
| 336 | 345 | if {$r} { |
| 337 | - protOut "test $name OK" | |
| 346 | + if {$knownBug && !$::STRICT} { | |
| 347 | + protOut "test $name OK (knownBug)?" | |
| 348 | + } else { | |
| 349 | + protOut "test $name OK" | |
| 350 | + } | |
| 338 | 351 | } else { |
| 339 | - protOut "test $name FAILED!" 1 | |
| 340 | - if {$::QUIET} {protOut "RESULT: $RESULT" 1} | |
| 341 | - lappend bad_test $name | |
| 342 | - if {$::HALT} exit | |
| 352 | + if {$knownBug && !$::STRICT} { | |
| 353 | + protOut "test $name FAILED (knownBug)!" 1 | |
| 354 | + lappend ignored_test $name | |
| 355 | + } else { | |
| 356 | + protOut "test $name FAILED!" 1 | |
| 357 | + if {$::QUIET} {protOut "RESULT: $RESULT" 1} | |
| 358 | + lappend bad_test $name | |
| 359 | + if {$::HALT} exit | |
| 360 | + } | |
| 343 | 361 | } |
| 344 | 362 | } |
| 345 | 363 | set bad_test {} |
| 364 | +set ignored_test {} | |
| 346 | 365 | |
| 347 | 366 | # Return a random string N characters long. |
| 348 | 367 | # |
| 349 | 368 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 350 | 369 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -494,10 +513,17 @@ | ||
| 494 | 513 | protOut "***** End of $testfile: [llength $bad_test] errors so far ******" |
| 495 | 514 | cd $origwd |
| 496 | 515 | } |
| 497 | 516 | set nErr [llength $bad_test] |
| 498 | 517 | if {$nErr>0 || !$::QUIET} { |
| 499 | - protOut "***** Final result: $nErr errors out of $test_count tests" 1 | |
| 518 | + protOut "***** Final results: $nErr errors out of $test_count tests" 1 | |
| 519 | +} | |
| 520 | +if {$nErr>0} { | |
| 521 | + protOut "***** Considered failures: $bad_test" 1 | |
| 522 | +} | |
| 523 | +set nErr [llength $ignored_test] | |
| 524 | +if {$nErr>0 || !$::QUIET} { | |
| 525 | + protOut "***** Ignored results: $nErr ignored errors out of $test_count tests" 1 | |
| 500 | 526 | } |
| 501 | 527 | if {$nErr>0} { |
| 502 | - protOut "***** Failures: $bad_test" 1 | |
| 528 | + protOut "***** Ignored failures: $ignored_test" 1 | |
| 503 | 529 | } |
| 504 | 530 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -58,10 +58,18 @@ | |
| 58 | set QUIET 1 |
| 59 | set argv [lreplace $argv $i $i] |
| 60 | } else { |
| 61 | set QUIET 0 |
| 62 | } |
| 63 | |
| 64 | if {[llength $argv]==0} { |
| 65 | foreach f [lsort [glob $testdir/*.test]] { |
| 66 | set base [file root [file tail $f]] |
| 67 | lappend argv $base |
| @@ -327,24 +335,35 @@ | |
| 327 | } |
| 328 | |
| 329 | # Perform a test |
| 330 | # |
| 331 | set test_count 0 |
| 332 | proc test {name expr} { |
| 333 | global bad_test test_count RESULT |
| 334 | incr test_count |
| 335 | set r [uplevel 1 [list expr $expr]] |
| 336 | if {$r} { |
| 337 | protOut "test $name OK" |
| 338 | } else { |
| 339 | protOut "test $name FAILED!" 1 |
| 340 | if {$::QUIET} {protOut "RESULT: $RESULT" 1} |
| 341 | lappend bad_test $name |
| 342 | if {$::HALT} exit |
| 343 | } |
| 344 | } |
| 345 | set bad_test {} |
| 346 | |
| 347 | # Return a random string N characters long. |
| 348 | # |
| 349 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 350 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -494,10 +513,17 @@ | |
| 494 | protOut "***** End of $testfile: [llength $bad_test] errors so far ******" |
| 495 | cd $origwd |
| 496 | } |
| 497 | set nErr [llength $bad_test] |
| 498 | if {$nErr>0 || !$::QUIET} { |
| 499 | protOut "***** Final result: $nErr errors out of $test_count tests" 1 |
| 500 | } |
| 501 | if {$nErr>0} { |
| 502 | protOut "***** Failures: $bad_test" 1 |
| 503 | } |
| 504 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -58,10 +58,18 @@ | |
| 58 | set QUIET 1 |
| 59 | set argv [lreplace $argv $i $i] |
| 60 | } else { |
| 61 | set QUIET 0 |
| 62 | } |
| 63 | |
| 64 | set i [lsearch $argv -strict] |
| 65 | if {$i>=0} { |
| 66 | set STRICT 1 |
| 67 | set argv [lreplace $argv $i $i] |
| 68 | } else { |
| 69 | set STRICT 0 |
| 70 | } |
| 71 | |
| 72 | if {[llength $argv]==0} { |
| 73 | foreach f [lsort [glob $testdir/*.test]] { |
| 74 | set base [file root [file tail $f]] |
| 75 | lappend argv $base |
| @@ -327,24 +335,35 @@ | |
| 335 | } |
| 336 | |
| 337 | # Perform a test |
| 338 | # |
| 339 | set test_count 0 |
| 340 | proc test {name expr {constraints ""}} { |
| 341 | global bad_test ignored_test test_count RESULT |
| 342 | incr test_count |
| 343 | set knownBug [expr {"knownBug" in $constraints}] |
| 344 | set r [uplevel 1 [list expr $expr]] |
| 345 | if {$r} { |
| 346 | if {$knownBug && !$::STRICT} { |
| 347 | protOut "test $name OK (knownBug)?" |
| 348 | } else { |
| 349 | protOut "test $name OK" |
| 350 | } |
| 351 | } else { |
| 352 | if {$knownBug && !$::STRICT} { |
| 353 | protOut "test $name FAILED (knownBug)!" 1 |
| 354 | lappend ignored_test $name |
| 355 | } else { |
| 356 | protOut "test $name FAILED!" 1 |
| 357 | if {$::QUIET} {protOut "RESULT: $RESULT" 1} |
| 358 | lappend bad_test $name |
| 359 | if {$::HALT} exit |
| 360 | } |
| 361 | } |
| 362 | } |
| 363 | set bad_test {} |
| 364 | set ignored_test {} |
| 365 | |
| 366 | # Return a random string N characters long. |
| 367 | # |
| 368 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 369 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -494,10 +513,17 @@ | |
| 513 | protOut "***** End of $testfile: [llength $bad_test] errors so far ******" |
| 514 | cd $origwd |
| 515 | } |
| 516 | set nErr [llength $bad_test] |
| 517 | if {$nErr>0 || !$::QUIET} { |
| 518 | protOut "***** Final results: $nErr errors out of $test_count tests" 1 |
| 519 | } |
| 520 | if {$nErr>0} { |
| 521 | protOut "***** Considered failures: $bad_test" 1 |
| 522 | } |
| 523 | set nErr [llength $ignored_test] |
| 524 | if {$nErr>0 || !$::QUIET} { |
| 525 | protOut "***** Ignored results: $nErr ignored errors out of $test_count tests" 1 |
| 526 | } |
| 527 | if {$nErr>0} { |
| 528 | protOut "***** Ignored failures: $ignored_test" 1 |
| 529 | } |
| 530 |
+17
| --- test/th1.test | ||
| +++ test/th1.test | ||
| @@ -1436,5 +1436,22 @@ | ||
| 1436 | 1436 | |
| 1437 | 1437 | ############################################################################### |
| 1438 | 1438 | |
| 1439 | 1439 | fossil test-th-eval {set tcl_platform(platform)} |
| 1440 | 1440 | test th1-platform-4 {$RESULT eq "windows" || $RESULT eq "unix"} |
| 1441 | + | |
| 1442 | +############################################################################### | |
| 1443 | + | |
| 1444 | +set th1FileName [file join $::tempPath th1-[pid].th1] | |
| 1445 | + | |
| 1446 | +write_file $th1FileName { | |
| 1447 | + set x "" | |
| 1448 | + for {set i 0} {$i < 10} {set i [expr {$i + 1}]} { | |
| 1449 | + set x "$x $i" | |
| 1450 | + } | |
| 1451 | + return [string trim $x] | |
| 1452 | + set y; # NOTE: Never hit. | |
| 1453 | +} | |
| 1454 | + | |
| 1455 | +fossil test-th-source $th1FileName | |
| 1456 | +test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}} | |
| 1457 | +file delete $th1FileName | |
| 1441 | 1458 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -1436,5 +1436,22 @@ | |
| 1436 | |
| 1437 | ############################################################################### |
| 1438 | |
| 1439 | fossil test-th-eval {set tcl_platform(platform)} |
| 1440 | test th1-platform-4 {$RESULT eq "windows" || $RESULT eq "unix"} |
| 1441 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -1436,5 +1436,22 @@ | |
| 1436 | |
| 1437 | ############################################################################### |
| 1438 | |
| 1439 | fossil test-th-eval {set tcl_platform(platform)} |
| 1440 | test th1-platform-4 {$RESULT eq "windows" || $RESULT eq "unix"} |
| 1441 | |
| 1442 | ############################################################################### |
| 1443 | |
| 1444 | set th1FileName [file join $::tempPath th1-[pid].th1] |
| 1445 | |
| 1446 | write_file $th1FileName { |
| 1447 | set x "" |
| 1448 | for {set i 0} {$i < 10} {set i [expr {$i + 1}]} { |
| 1449 | set x "$x $i" |
| 1450 | } |
| 1451 | return [string trim $x] |
| 1452 | set y; # NOTE: Never hit. |
| 1453 | } |
| 1454 | |
| 1455 | fossil test-th-source $th1FileName |
| 1456 | test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}} |
| 1457 | file delete $th1FileName |
| 1458 |
+1
-1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -158,11 +158,11 @@ | ||
| 158 | 158 | #### The directories where the OpenSSL include and library files are located. |
| 159 | 159 | # The recommended usage here is to use the Sysinternals junction tool |
| 160 | 160 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 161 | 161 | # Fossil source code directory and the target OpenSSL source directory. |
| 162 | 162 | # |
| 163 | -OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e | |
| 163 | +OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f | |
| 164 | 164 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 165 | 165 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 166 | 166 | |
| 167 | 167 | #### Either the directory where the Tcl library is installed or the Tcl |
| 168 | 168 | # source code directory resides (depending on the value of the macro |
| 169 | 169 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -158,11 +158,11 @@ | |
| 158 | #### The directories where the OpenSSL include and library files are located. |
| 159 | # The recommended usage here is to use the Sysinternals junction tool |
| 160 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 161 | # Fossil source code directory and the target OpenSSL source directory. |
| 162 | # |
| 163 | OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e |
| 164 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 165 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 166 | |
| 167 | #### Either the directory where the Tcl library is installed or the Tcl |
| 168 | # source code directory resides (depending on the value of the macro |
| 169 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -158,11 +158,11 @@ | |
| 158 | #### The directories where the OpenSSL include and library files are located. |
| 159 | # The recommended usage here is to use the Sysinternals junction tool |
| 160 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 161 | # Fossil source code directory and the target OpenSSL source directory. |
| 162 | # |
| 163 | OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f |
| 164 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 165 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 166 | |
| 167 | #### Either the directory where the Tcl library is installed or the Tcl |
| 168 | # source code directory resides (depending on the value of the macro |
| 169 |
+1
-1
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -158,11 +158,11 @@ | ||
| 158 | 158 | #### The directories where the OpenSSL include and library files are located. |
| 159 | 159 | # The recommended usage here is to use the Sysinternals junction tool |
| 160 | 160 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 161 | 161 | # Fossil source code directory and the target OpenSSL source directory. |
| 162 | 162 | # |
| 163 | -OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e | |
| 163 | +OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f | |
| 164 | 164 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 165 | 165 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 166 | 166 | |
| 167 | 167 | #### Either the directory where the Tcl library is installed or the Tcl |
| 168 | 168 | # source code directory resides (depending on the value of the macro |
| 169 | 169 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -158,11 +158,11 @@ | |
| 158 | #### The directories where the OpenSSL include and library files are located. |
| 159 | # The recommended usage here is to use the Sysinternals junction tool |
| 160 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 161 | # Fossil source code directory and the target OpenSSL source directory. |
| 162 | # |
| 163 | OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e |
| 164 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 165 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 166 | |
| 167 | #### Either the directory where the Tcl library is installed or the Tcl |
| 168 | # source code directory resides (depending on the value of the macro |
| 169 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -158,11 +158,11 @@ | |
| 158 | #### The directories where the OpenSSL include and library files are located. |
| 159 | # The recommended usage here is to use the Sysinternals junction tool |
| 160 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 161 | # Fossil source code directory and the target OpenSSL source directory. |
| 162 | # |
| 163 | OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f |
| 164 | OPENSSLINCDIR = $(OPENSSLDIR)/include |
| 165 | OPENSSLLIBDIR = $(OPENSSLDIR) |
| 166 | |
| 167 | #### Either the directory where the Tcl library is installed or the Tcl |
| 168 | # source code directory resides (depending on the value of the macro |
| 169 |
+1
-1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -93,11 +93,11 @@ | ||
| 93 | 93 | !ifndef FOSSIL_ENABLE_WINXP |
| 94 | 94 | FOSSIL_ENABLE_WINXP = 0 |
| 95 | 95 | !endif |
| 96 | 96 | |
| 97 | 97 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 98 | -SSLDIR = $(B)\compat\openssl-1.0.2e | |
| 98 | +SSLDIR = $(B)\compat\openssl-1.0.2f | |
| 99 | 99 | SSLINCDIR = $(SSLDIR)\inc32 |
| 100 | 100 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 101 | 101 | SSLLIBDIR = $(SSLDIR)\out32dll |
| 102 | 102 | !else |
| 103 | 103 | SSLLIBDIR = $(SSLDIR)\out32 |
| 104 | 104 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -93,11 +93,11 @@ | |
| 93 | !ifndef FOSSIL_ENABLE_WINXP |
| 94 | FOSSIL_ENABLE_WINXP = 0 |
| 95 | !endif |
| 96 | |
| 97 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 98 | SSLDIR = $(B)\compat\openssl-1.0.2e |
| 99 | SSLINCDIR = $(SSLDIR)\inc32 |
| 100 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 101 | SSLLIBDIR = $(SSLDIR)\out32dll |
| 102 | !else |
| 103 | SSLLIBDIR = $(SSLDIR)\out32 |
| 104 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -93,11 +93,11 @@ | |
| 93 | !ifndef FOSSIL_ENABLE_WINXP |
| 94 | FOSSIL_ENABLE_WINXP = 0 |
| 95 | !endif |
| 96 | |
| 97 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 98 | SSLDIR = $(B)\compat\openssl-1.0.2f |
| 99 | SSLINCDIR = $(SSLDIR)\inc32 |
| 100 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 101 | SSLLIBDIR = $(SSLDIR)\out32dll |
| 102 | !else |
| 103 | SSLLIBDIR = $(SSLDIR)\out32 |
| 104 |
+4
-2
| --- win/buildmsvc.bat | ||
| +++ win/buildmsvc.bat | ||
| @@ -259,12 +259,14 @@ | ||
| 259 | 259 | CALL :fn_UnsetVariable PFILES_SDK71A |
| 260 | 260 | SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1 |
| 261 | 261 | GOTO :EOF |
| 262 | 262 | |
| 263 | 263 | :fn_UnsetVariable |
| 264 | - IF NOT "%1" == "" ( | |
| 265 | - SET %1= | |
| 264 | + SET VALUE=%1 | |
| 265 | + IF DEFINED VALUE ( | |
| 266 | + SET %VALUE%= | |
| 267 | + SET VALUE= | |
| 266 | 268 | CALL :fn_ResetErrorLevel |
| 267 | 269 | ) |
| 268 | 270 | GOTO :EOF |
| 269 | 271 | |
| 270 | 272 | :fn_ResetErrorLevel |
| 271 | 273 |
| --- win/buildmsvc.bat | |
| +++ win/buildmsvc.bat | |
| @@ -259,12 +259,14 @@ | |
| 259 | CALL :fn_UnsetVariable PFILES_SDK71A |
| 260 | SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1 |
| 261 | GOTO :EOF |
| 262 | |
| 263 | :fn_UnsetVariable |
| 264 | IF NOT "%1" == "" ( |
| 265 | SET %1= |
| 266 | CALL :fn_ResetErrorLevel |
| 267 | ) |
| 268 | GOTO :EOF |
| 269 | |
| 270 | :fn_ResetErrorLevel |
| 271 |
| --- win/buildmsvc.bat | |
| +++ win/buildmsvc.bat | |
| @@ -259,12 +259,14 @@ | |
| 259 | CALL :fn_UnsetVariable PFILES_SDK71A |
| 260 | SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1 |
| 261 | GOTO :EOF |
| 262 | |
| 263 | :fn_UnsetVariable |
| 264 | SET VALUE=%1 |
| 265 | IF DEFINED VALUE ( |
| 266 | SET %VALUE%= |
| 267 | SET VALUE= |
| 268 | CALL :fn_ResetErrorLevel |
| 269 | ) |
| 270 | GOTO :EOF |
| 271 | |
| 272 | :fn_ResetErrorLevel |
| 273 |
+14
-8
| --- www/build.wiki | ||
| +++ www/build.wiki | ||
| @@ -111,23 +111,29 @@ | ||
| 111 | 111 | <li><p><i>Unix without running "configure"</i> → if you prefer to avoid |
| 112 | 112 | running configure, you can also use: <b>make -f Makefile.classic</b>. You may |
| 113 | 113 | want to make minor edits to Makefile.classic to configure the build for your |
| 114 | 114 | system. |
| 115 | 115 | |
| 116 | -<li><p><i>MinGW3.x (not 4.0)/MinGW-w64</i> → Use the mingw makefile: | |
| 117 | -"<b>make -f win/Makefile.mingw</b>". On a Windows box you will | |
| 118 | -need either Cygwin or Msys as build environment. On Cygwin, Linux | |
| 119 | -or Darwin you may want to make minor edits to win/Makefile.mingw | |
| 120 | -to configure the cross-compile environment. | |
| 116 | +<li><p><i>MinGW 3.x (<u>not</u> 4.x) / MinGW-w64</i> → Use the MinGW makefile: | |
| 117 | +"<b>make -f win/Makefile.mingw</b>". On a Windows box you will need either | |
| 118 | +Cygwin or Msys as build environment. On Cygwin, Linux or Darwin you may want | |
| 119 | +to make minor edits to win/Makefile.mingw to configure the cross-compile | |
| 120 | +environment. | |
| 121 | 121 | |
| 122 | 122 | To enable the native [./th1.md#tclEval | Tcl integration feature], use a |
| 123 | 123 | command line like the following (all on one line): |
| 124 | 124 | |
| 125 | 125 | <b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b> |
| 126 | 126 | |
| 127 | -Hint: don't use MinGW-4.0, it will compile but fossil won't work correctly, see | |
| 128 | -<a href="https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c">https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c</a>. | |
| 127 | +Alternatively, <b>./configure</b> may now be used to create a Makefile | |
| 128 | +suitable for use with MinGW; however, options passed to configure that are | |
| 129 | +not applicable on Windows may cause the configuration or compilation to fail | |
| 130 | +(e.g. fusefs, internal-sqlite, etc). | |
| 131 | + | |
| 132 | +<i>HINT</i>: Do <u>not</u> use MinGW-4.x, it may compile but the Fossil binary | |
| 133 | +will not work correctly, see | |
| 134 | +[https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c | ticket]. | |
| 129 | 135 | |
| 130 | 136 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 131 | 137 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 132 | 138 | "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch |
| 133 | 139 | file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to |
| @@ -135,11 +141,11 @@ | ||
| 135 | 141 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 136 | 142 | first <a href="https://www.openssl.org/source/">download the official |
| 137 | 143 | source code for OpenSSL</a> and extract it to an appropriately named |
| 138 | 144 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 139 | 145 | [/tree?ci=trunk&name=compat | compat] directory (e.g. |
| 140 | -"<b>compat/openssl-1.0.2e</b>"), then make sure that some recent | |
| 146 | +"<b>compat/openssl-1.0.2f</b>"), then make sure that some recent | |
| 141 | 147 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 142 | 148 | and finally run one of the following commands: |
| 143 | 149 | <blockquote><pre> |
| 144 | 150 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 145 | 151 | </pre></blockquote> |
| 146 | 152 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -111,23 +111,29 @@ | |
| 111 | <li><p><i>Unix without running "configure"</i> → if you prefer to avoid |
| 112 | running configure, you can also use: <b>make -f Makefile.classic</b>. You may |
| 113 | want to make minor edits to Makefile.classic to configure the build for your |
| 114 | system. |
| 115 | |
| 116 | <li><p><i>MinGW3.x (not 4.0)/MinGW-w64</i> → Use the mingw makefile: |
| 117 | "<b>make -f win/Makefile.mingw</b>". On a Windows box you will |
| 118 | need either Cygwin or Msys as build environment. On Cygwin, Linux |
| 119 | or Darwin you may want to make minor edits to win/Makefile.mingw |
| 120 | to configure the cross-compile environment. |
| 121 | |
| 122 | To enable the native [./th1.md#tclEval | Tcl integration feature], use a |
| 123 | command line like the following (all on one line): |
| 124 | |
| 125 | <b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b> |
| 126 | |
| 127 | Hint: don't use MinGW-4.0, it will compile but fossil won't work correctly, see |
| 128 | <a href="https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c">https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c</a>. |
| 129 | |
| 130 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 131 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 132 | "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch |
| 133 | file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to |
| @@ -135,11 +141,11 @@ | |
| 135 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 136 | first <a href="https://www.openssl.org/source/">download the official |
| 137 | source code for OpenSSL</a> and extract it to an appropriately named |
| 138 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 139 | [/tree?ci=trunk&name=compat | compat] directory (e.g. |
| 140 | "<b>compat/openssl-1.0.2e</b>"), then make sure that some recent |
| 141 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 142 | and finally run one of the following commands: |
| 143 | <blockquote><pre> |
| 144 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 145 | </pre></blockquote> |
| 146 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -111,23 +111,29 @@ | |
| 111 | <li><p><i>Unix without running "configure"</i> → if you prefer to avoid |
| 112 | running configure, you can also use: <b>make -f Makefile.classic</b>. You may |
| 113 | want to make minor edits to Makefile.classic to configure the build for your |
| 114 | system. |
| 115 | |
| 116 | <li><p><i>MinGW 3.x (<u>not</u> 4.x) / MinGW-w64</i> → Use the MinGW makefile: |
| 117 | "<b>make -f win/Makefile.mingw</b>". On a Windows box you will need either |
| 118 | Cygwin or Msys as build environment. On Cygwin, Linux or Darwin you may want |
| 119 | to make minor edits to win/Makefile.mingw to configure the cross-compile |
| 120 | environment. |
| 121 | |
| 122 | To enable the native [./th1.md#tclEval | Tcl integration feature], use a |
| 123 | command line like the following (all on one line): |
| 124 | |
| 125 | <b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b> |
| 126 | |
| 127 | Alternatively, <b>./configure</b> may now be used to create a Makefile |
| 128 | suitable for use with MinGW; however, options passed to configure that are |
| 129 | not applicable on Windows may cause the configuration or compilation to fail |
| 130 | (e.g. fusefs, internal-sqlite, etc). |
| 131 | |
| 132 | <i>HINT</i>: Do <u>not</u> use MinGW-4.x, it may compile but the Fossil binary |
| 133 | will not work correctly, see |
| 134 | [https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c | ticket]. |
| 135 | |
| 136 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 137 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 138 | "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch |
| 139 | file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to |
| @@ -135,11 +141,11 @@ | |
| 141 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 142 | first <a href="https://www.openssl.org/source/">download the official |
| 143 | source code for OpenSSL</a> and extract it to an appropriately named |
| 144 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 145 | [/tree?ci=trunk&name=compat | compat] directory (e.g. |
| 146 | "<b>compat/openssl-1.0.2f</b>"), then make sure that some recent |
| 147 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 148 | and finally run one of the following commands: |
| 149 | <blockquote><pre> |
| 150 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 151 | </pre></blockquote> |
| 152 |