| | @@ -222,11 +222,11 @@ |
| 222 | 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | 224 | */ |
| 225 | 225 | #define SQLITE_VERSION "3.8.4" |
| 226 | 226 | #define SQLITE_VERSION_NUMBER 3008004 |
| 227 | | -#define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042" |
| 227 | +#define SQLITE_SOURCE_ID "2014-03-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730" |
| 228 | 228 | |
| 229 | 229 | /* |
| 230 | 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | 232 | ** |
| | @@ -36484,12 +36484,29 @@ |
| 36484 | 36484 | ** Interfaces for opening a shared library, finding entry points |
| 36485 | 36485 | ** within the shared library, and closing the shared library. |
| 36486 | 36486 | */ |
| 36487 | 36487 | static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){ |
| 36488 | 36488 | HANDLE h; |
| 36489 | +#if defined(__CYGWIN__) |
| 36490 | + int nFull = pVfs->mxPathname+1; |
| 36491 | + char *zFull = sqlite3MallocZero( nFull ); |
| 36492 | + void *zConverted = 0; |
| 36493 | + if( zFull==0 ){ |
| 36494 | + OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 36495 | + return 0; |
| 36496 | + } |
| 36497 | + if( winFullPathname(pVfs, zFilename, nFull, zFull)!=SQLITE_OK ){ |
| 36498 | + sqlite3_free(zFull); |
| 36499 | + OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 36500 | + return 0; |
| 36501 | + } |
| 36502 | + zConverted = winConvertFromUtf8Filename(zFull); |
| 36503 | + sqlite3_free(zFull); |
| 36504 | +#else |
| 36489 | 36505 | void *zConverted = winConvertFromUtf8Filename(zFilename); |
| 36490 | 36506 | UNUSED_PARAMETER(pVfs); |
| 36507 | +#endif |
| 36491 | 36508 | if( zConverted==0 ){ |
| 36492 | 36509 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 36493 | 36510 | return 0; |
| 36494 | 36511 | } |
| 36495 | 36512 | if( osIsNT() ){ |
| | @@ -55371,11 +55388,11 @@ |
| 55371 | 55388 | assert( pIdxKey->default_rc==1 |
| 55372 | 55389 | || pIdxKey->default_rc==0 |
| 55373 | 55390 | || pIdxKey->default_rc==-1 |
| 55374 | 55391 | ); |
| 55375 | 55392 | }else{ |
| 55376 | | - xRecordCompare = 0; /* Not actually used. Avoids a compiler warning. */ |
| 55393 | + xRecordCompare = 0; /* All keys are integers */ |
| 55377 | 55394 | } |
| 55378 | 55395 | |
| 55379 | 55396 | rc = moveToRoot(pCur); |
| 55380 | 55397 | if( rc ){ |
| 55381 | 55398 | return rc; |
| | @@ -62561,10 +62578,14 @@ |
| 62561 | 62578 | ** sqlite3MemRelease() were called from here. With -O2, this jumps |
| 62562 | 62579 | ** to 6.6 percent. The test case is inserting 1000 rows into a table |
| 62563 | 62580 | ** with no indexes using a single prepared INSERT statement, bind() |
| 62564 | 62581 | ** and reset(). Inserts are grouped into a transaction. |
| 62565 | 62582 | */ |
| 62583 | + testcase( p->flags & MEM_Agg ); |
| 62584 | + testcase( p->flags & MEM_Dyn ); |
| 62585 | + testcase( p->flags & MEM_Frame ); |
| 62586 | + testcase( p->flags & MEM_RowSet ); |
| 62566 | 62587 | if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){ |
| 62567 | 62588 | sqlite3VdbeMemRelease(p); |
| 62568 | 62589 | }else if( p->zMalloc ){ |
| 62569 | 62590 | sqlite3DbFree(db, p->zMalloc); |
| 62570 | 62591 | p->zMalloc = 0; |
| | @@ -64289,31 +64310,36 @@ |
| 64289 | 64310 | break; |
| 64290 | 64311 | } |
| 64291 | 64312 | case 1: { /* 1-byte signed integer */ |
| 64292 | 64313 | pMem->u.i = ONE_BYTE_INT(buf); |
| 64293 | 64314 | pMem->flags = MEM_Int; |
| 64315 | + testcase( pMem->u.i<0 ); |
| 64294 | 64316 | return 1; |
| 64295 | 64317 | } |
| 64296 | 64318 | case 2: { /* 2-byte signed integer */ |
| 64297 | 64319 | pMem->u.i = TWO_BYTE_INT(buf); |
| 64298 | 64320 | pMem->flags = MEM_Int; |
| 64321 | + testcase( pMem->u.i<0 ); |
| 64299 | 64322 | return 2; |
| 64300 | 64323 | } |
| 64301 | 64324 | case 3: { /* 3-byte signed integer */ |
| 64302 | 64325 | pMem->u.i = THREE_BYTE_INT(buf); |
| 64303 | 64326 | pMem->flags = MEM_Int; |
| 64327 | + testcase( pMem->u.i<0 ); |
| 64304 | 64328 | return 3; |
| 64305 | 64329 | } |
| 64306 | 64330 | case 4: { /* 4-byte signed integer */ |
| 64307 | 64331 | y = FOUR_BYTE_UINT(buf); |
| 64308 | 64332 | pMem->u.i = (i64)*(int*)&y; |
| 64309 | 64333 | pMem->flags = MEM_Int; |
| 64334 | + testcase( pMem->u.i<0 ); |
| 64310 | 64335 | return 4; |
| 64311 | 64336 | } |
| 64312 | 64337 | case 5: { /* 6-byte signed integer */ |
| 64313 | 64338 | pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf); |
| 64314 | 64339 | pMem->flags = MEM_Int; |
| 64340 | + testcase( pMem->u.i<0 ); |
| 64315 | 64341 | return 6; |
| 64316 | 64342 | } |
| 64317 | 64343 | case 6: /* 8-byte signed integer */ |
| 64318 | 64344 | case 7: { /* IEEE floating point */ |
| 64319 | 64345 | #if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT) |
| | @@ -64332,10 +64358,11 @@ |
| 64332 | 64358 | y = FOUR_BYTE_UINT(buf+4); |
| 64333 | 64359 | x = (x<<32) | y; |
| 64334 | 64360 | if( serial_type==6 ){ |
| 64335 | 64361 | pMem->u.i = *(i64*)&x; |
| 64336 | 64362 | pMem->flags = MEM_Int; |
| 64363 | + testcase( pMem->u.i<0 ); |
| 64337 | 64364 | }else{ |
| 64338 | 64365 | assert( sizeof(x)==8 && sizeof(pMem->r)==8 ); |
| 64339 | 64366 | swapMixedEndianFloat(x); |
| 64340 | 64367 | memcpy(&pMem->r, &x, sizeof(x)); |
| 64341 | 64368 | pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real; |
| | @@ -64677,24 +64704,30 @@ |
| 64677 | 64704 | u32 y; |
| 64678 | 64705 | assert( CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7) ); |
| 64679 | 64706 | switch( serial_type ){ |
| 64680 | 64707 | case 0: |
| 64681 | 64708 | case 1: |
| 64709 | + testcase( aKey[0]&0x80 ); |
| 64682 | 64710 | return ONE_BYTE_INT(aKey); |
| 64683 | 64711 | case 2: |
| 64712 | + testcase( aKey[0]&0x80 ); |
| 64684 | 64713 | return TWO_BYTE_INT(aKey); |
| 64685 | 64714 | case 3: |
| 64715 | + testcase( aKey[0]&0x80 ); |
| 64686 | 64716 | return THREE_BYTE_INT(aKey); |
| 64687 | 64717 | case 4: { |
| 64718 | + testcase( aKey[0]&0x80 ); |
| 64688 | 64719 | y = FOUR_BYTE_UINT(aKey); |
| 64689 | 64720 | return (i64)*(int*)&y; |
| 64690 | 64721 | } |
| 64691 | 64722 | case 5: { |
| 64723 | + testcase( aKey[0]&0x80 ); |
| 64692 | 64724 | return FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey); |
| 64693 | 64725 | } |
| 64694 | 64726 | case 6: { |
| 64695 | 64727 | u64 x = FOUR_BYTE_UINT(aKey); |
| 64728 | + testcase( aKey[0]&0x80 ); |
| 64696 | 64729 | x = (x<<32) | FOUR_BYTE_UINT(aKey+4); |
| 64697 | 64730 | return (i64)*(i64*)&x; |
| 64698 | 64731 | } |
| 64699 | 64732 | } |
| 64700 | 64733 | |
| | @@ -64758,10 +64791,11 @@ |
| 64758 | 64791 | u32 serial_type; |
| 64759 | 64792 | |
| 64760 | 64793 | /* RHS is an integer */ |
| 64761 | 64794 | if( pRhs->flags & MEM_Int ){ |
| 64762 | 64795 | serial_type = aKey1[idx1]; |
| 64796 | + testcase( serial_type==12 ); |
| 64763 | 64797 | if( serial_type>=12 ){ |
| 64764 | 64798 | rc = +1; |
| 64765 | 64799 | }else if( serial_type==0 ){ |
| 64766 | 64800 | rc = -1; |
| 64767 | 64801 | }else if( serial_type==7 ){ |
| | @@ -64808,16 +64842,19 @@ |
| 64808 | 64842 | } |
| 64809 | 64843 | |
| 64810 | 64844 | /* RHS is a string */ |
| 64811 | 64845 | else if( pRhs->flags & MEM_Str ){ |
| 64812 | 64846 | getVarint32(&aKey1[idx1], serial_type); |
| 64847 | + testcase( serial_type==12 ); |
| 64813 | 64848 | if( serial_type<12 ){ |
| 64814 | 64849 | rc = -1; |
| 64815 | 64850 | }else if( !(serial_type & 0x01) ){ |
| 64816 | 64851 | rc = +1; |
| 64817 | 64852 | }else{ |
| 64818 | 64853 | mem1.n = (serial_type - 12) / 2; |
| 64854 | + testcase( (d1+mem1.n)==(unsigned)nKey1 ); |
| 64855 | + testcase( (d1+mem1.n+1)==(unsigned)nKey1 ); |
| 64819 | 64856 | if( (d1+mem1.n) > (unsigned)nKey1 ){ |
| 64820 | 64857 | rc = 1; /* Corruption */ |
| 64821 | 64858 | }else if( pKeyInfo->aColl[i] ){ |
| 64822 | 64859 | mem1.enc = pKeyInfo->enc; |
| 64823 | 64860 | mem1.db = pKeyInfo->db; |
| | @@ -64833,14 +64870,17 @@ |
| 64833 | 64870 | } |
| 64834 | 64871 | |
| 64835 | 64872 | /* RHS is a blob */ |
| 64836 | 64873 | else if( pRhs->flags & MEM_Blob ){ |
| 64837 | 64874 | getVarint32(&aKey1[idx1], serial_type); |
| 64875 | + testcase( serial_type==12 ); |
| 64838 | 64876 | if( serial_type<12 || (serial_type & 0x01) ){ |
| 64839 | 64877 | rc = -1; |
| 64840 | 64878 | }else{ |
| 64841 | 64879 | int nStr = (serial_type - 12) / 2; |
| 64880 | + testcase( (d1+nStr)==(unsigned)nKey1 ); |
| 64881 | + testcase( (d1+nStr+1)==(unsigned)nKey1 ); |
| 64842 | 64882 | if( (d1+nStr) > (unsigned)nKey1 ){ |
| 64843 | 64883 | rc = 1; /* Corruption */ |
| 64844 | 64884 | }else{ |
| 64845 | 64885 | int nCmp = MIN(nStr, pRhs->n); |
| 64846 | 64886 | rc = memcmp(&aKey1[d1], pRhs->z, nCmp); |
| | @@ -64910,33 +64950,39 @@ |
| 64910 | 64950 | |
| 64911 | 64951 | assert( bSkip==0 ); |
| 64912 | 64952 | switch( serial_type ){ |
| 64913 | 64953 | case 1: { /* 1-byte signed integer */ |
| 64914 | 64954 | lhs = ONE_BYTE_INT(aKey); |
| 64955 | + testcase( lhs<0 ); |
| 64915 | 64956 | break; |
| 64916 | 64957 | } |
| 64917 | 64958 | case 2: { /* 2-byte signed integer */ |
| 64918 | 64959 | lhs = TWO_BYTE_INT(aKey); |
| 64960 | + testcase( lhs<0 ); |
| 64919 | 64961 | break; |
| 64920 | 64962 | } |
| 64921 | 64963 | case 3: { /* 3-byte signed integer */ |
| 64922 | 64964 | lhs = THREE_BYTE_INT(aKey); |
| 64965 | + testcase( lhs<0 ); |
| 64923 | 64966 | break; |
| 64924 | 64967 | } |
| 64925 | 64968 | case 4: { /* 4-byte signed integer */ |
| 64926 | 64969 | y = FOUR_BYTE_UINT(aKey); |
| 64927 | 64970 | lhs = (i64)*(int*)&y; |
| 64971 | + testcase( lhs<0 ); |
| 64928 | 64972 | break; |
| 64929 | 64973 | } |
| 64930 | 64974 | case 5: { /* 6-byte signed integer */ |
| 64931 | 64975 | lhs = FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey); |
| 64976 | + testcase( lhs<0 ); |
| 64932 | 64977 | break; |
| 64933 | 64978 | } |
| 64934 | 64979 | case 6: { /* 8-byte signed integer */ |
| 64935 | 64980 | x = FOUR_BYTE_UINT(aKey); |
| 64936 | 64981 | x = (x<<32) | FOUR_BYTE_UINT(aKey+4); |
| 64937 | 64982 | lhs = *(i64*)&x; |
| 64983 | + testcase( lhs<0 ); |
| 64938 | 64984 | break; |
| 64939 | 64985 | } |
| 64940 | 64986 | case 8: |
| 64941 | 64987 | lhs = 0; |
| 64942 | 64988 | break; |
| | @@ -65069,13 +65115,15 @@ |
| 65069 | 65115 | p->r2 = 1; |
| 65070 | 65116 | } |
| 65071 | 65117 | if( (flags & MEM_Int) ){ |
| 65072 | 65118 | return vdbeRecordCompareInt; |
| 65073 | 65119 | } |
| 65074 | | - if( (flags & (MEM_Int|MEM_Real|MEM_Null|MEM_Blob))==0 |
| 65075 | | - && p->pKeyInfo->aColl[0]==0 |
| 65076 | | - ){ |
| 65120 | + testcase( flags & MEM_Real ); |
| 65121 | + testcase( flags & MEM_Null ); |
| 65122 | + testcase( flags & MEM_Blob ); |
| 65123 | + if( (flags & (MEM_Real|MEM_Null|MEM_Blob))==0 && p->pKeyInfo->aColl[0]==0 ){ |
| 65124 | + assert( flags & MEM_Str ); |
| 65077 | 65125 | return vdbeRecordCompareString; |
| 65078 | 65126 | } |
| 65079 | 65127 | } |
| 65080 | 65128 | |
| 65081 | 65129 | return sqlite3VdbeRecordCompare; |
| | @@ -66978,11 +67026,11 @@ |
| 66978 | 67026 | ** value of the cell. This macro verifies that shallow copies are |
| 66979 | 67027 | ** not misused. A shallow copy of a string or blob just copies a |
| 66980 | 67028 | ** pointer to the string or blob, not the content. If the original |
| 66981 | 67029 | ** is changed while the copy is still in use, the string or blob might |
| 66982 | 67030 | ** be changed out from under the copy. This macro verifies that nothing |
| 66983 | | -** like that every happens. |
| 67031 | +** like that ever happens. |
| 66984 | 67032 | */ |
| 66985 | 67033 | #ifdef SQLITE_DEBUG |
| 66986 | 67034 | # define memAboutToChange(P,M) sqlite3VdbeMemAboutToChange(P,M) |
| 66987 | 67035 | #else |
| 66988 | 67036 | # define memAboutToChange(P,M) |
| | @@ -67710,10 +67758,15 @@ |
| 67710 | 67758 | ** |
| 67711 | 67759 | ** An unconditional jump to address P2. |
| 67712 | 67760 | ** The next instruction executed will be |
| 67713 | 67761 | ** the one at index P2 from the beginning of |
| 67714 | 67762 | ** the program. |
| 67763 | +** |
| 67764 | +** The P1 parameter is not actually used by this opcode. However, it |
| 67765 | +** is sometimes set to 1 instead of 0 as a hint to the command-line shell |
| 67766 | +** that this Goto is the bottom of a loop and that the lines from P2 down |
| 67767 | +** to the current line should be indented for EXPLAIN output. |
| 67715 | 67768 | */ |
| 67716 | 67769 | case OP_Goto: { /* jump */ |
| 67717 | 67770 | pc = pOp->p2 - 1; |
| 67718 | 67771 | |
| 67719 | 67772 | /* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev, |
| | @@ -69205,12 +69258,12 @@ |
| 69205 | 69258 | |
| 69206 | 69259 | /* Opcode: Once P1 P2 * * * |
| 69207 | 69260 | ** |
| 69208 | 69261 | ** Check if OP_Once flag P1 is set. If so, jump to instruction P2. Otherwise, |
| 69209 | 69262 | ** set the flag and fall through to the next instruction. In other words, |
| 69210 | | -** this opcode causes all following up codes up through P2 (but not including |
| 69211 | | -** P2) to run just once and skipped on subsequent times through the loop. |
| 69263 | +** this opcode causes all following opcodes up through P2 (but not including |
| 69264 | +** P2) to run just once and to be skipped on subsequent times through the loop. |
| 69212 | 69265 | */ |
| 69213 | 69266 | case OP_Once: { /* jump */ |
| 69214 | 69267 | assert( pOp->p1<p->nOnceFlag ); |
| 69215 | 69268 | VdbeBranchTaken(p->aOnceFlag[pOp->p1]!=0, 2); |
| 69216 | 69269 | if( p->aOnceFlag[pOp->p1] ){ |
| | @@ -83299,11 +83352,14 @@ |
| 83299 | 83352 | VdbeCoverage(v); |
| 83300 | 83353 | callStatGet(v, regStat4, STAT_GET_NEQ, regEq); |
| 83301 | 83354 | callStatGet(v, regStat4, STAT_GET_NLT, regLt); |
| 83302 | 83355 | callStatGet(v, regStat4, STAT_GET_NDLT, regDLt); |
| 83303 | 83356 | sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0); |
| 83304 | | - VdbeCoverage(v); |
| 83357 | + /* We know that the regSampleRowid row exists because it was read by |
| 83358 | + ** the previous loop. Thus the not-found jump of seekOp will never |
| 83359 | + ** be taken */ |
| 83360 | + VdbeCoverageNeverTaken(v); |
| 83305 | 83361 | #ifdef SQLITE_ENABLE_STAT3 |
| 83306 | 83362 | sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur, |
| 83307 | 83363 | pIdx->aiColumn[0], regSample); |
| 83308 | 83364 | #else |
| 83309 | 83365 | for(i=0; i<nCol; i++){ |
| | @@ -83313,11 +83369,11 @@ |
| 83313 | 83369 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol+1, regSample); |
| 83314 | 83370 | #endif |
| 83315 | 83371 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp); |
| 83316 | 83372 | sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid); |
| 83317 | 83373 | sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid); |
| 83318 | | - sqlite3VdbeAddOp2(v, OP_Goto, 0, addrNext); |
| 83374 | + sqlite3VdbeAddOp2(v, OP_Goto, 1, addrNext); /* P1==1 for end-of-loop */ |
| 83319 | 83375 | sqlite3VdbeJumpHere(v, addrIsNull); |
| 83320 | 83376 | } |
| 83321 | 83377 | #endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */ |
| 83322 | 83378 | |
| 83323 | 83379 | /* End of analysis */ |
| | @@ -93479,17 +93535,17 @@ |
| 93479 | 93535 | |
| 93480 | 93536 | /* |
| 93481 | 93537 | ** Compute the affinity string for table pTab, if it has not already been |
| 93482 | 93538 | ** computed. As an optimization, omit trailing SQLITE_AFF_NONE affinities. |
| 93483 | 93539 | ** |
| 93484 | | -** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values and |
| 93540 | +** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values) and |
| 93485 | 93541 | ** if iReg>0 then code an OP_Affinity opcode that will set the affinities |
| 93486 | 93542 | ** for register iReg and following. Or if affinities exists and iReg==0, |
| 93487 | 93543 | ** then just set the P4 operand of the previous opcode (which should be |
| 93488 | 93544 | ** an OP_MakeRecord) to the affinity string. |
| 93489 | 93545 | ** |
| 93490 | | -** A column affinity string has one character column: |
| 93546 | +** A column affinity string has one character per column: |
| 93491 | 93547 | ** |
| 93492 | 93548 | ** Character Column affinity |
| 93493 | 93549 | ** ------------------------------ |
| 93494 | 93550 | ** 'a' TEXT |
| 93495 | 93551 | ** 'b' NONE |
| | @@ -93526,14 +93582,13 @@ |
| 93526 | 93582 | } |
| 93527 | 93583 | } |
| 93528 | 93584 | |
| 93529 | 93585 | /* |
| 93530 | 93586 | ** Return non-zero if the table pTab in database iDb or any of its indices |
| 93531 | | -** have been opened at any point in the VDBE program beginning at location |
| 93532 | | -** iStartAddr throught the end of the program. This is used to see if |
| 93587 | +** have been opened at any point in the VDBE program. This is used to see if |
| 93533 | 93588 | ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can |
| 93534 | | -** run without using temporary table for the results of the SELECT. |
| 93589 | +** run without using a temporary table for the results of the SELECT. |
| 93535 | 93590 | */ |
| 93536 | 93591 | static int readsTable(Parse *p, int iDb, Table *pTab){ |
| 93537 | 93592 | Vdbe *v = sqlite3GetVdbe(p); |
| 93538 | 93593 | int i; |
| 93539 | 93594 | int iEnd = sqlite3VdbeCurrentAddr(v); |
| | @@ -112384,17 +112439,17 @@ |
| 112384 | 112439 | } |
| 112385 | 112440 | if( pLoop->wsFlags & WHERE_TOP_LIMIT ){ |
| 112386 | 112441 | pRangeEnd = pLoop->aLTerm[j++]; |
| 112387 | 112442 | nExtraReg = 1; |
| 112388 | 112443 | if( pRangeStart==0 |
| 112389 | | - && (pRangeEnd->wtFlags & TERM_VNULL)==0 |
| 112390 | 112444 | && (j = pIdx->aiColumn[nEq])>=0 |
| 112391 | 112445 | && pIdx->pTable->aCol[j].notNull==0 |
| 112392 | 112446 | ){ |
| 112393 | 112447 | bSeekPastNull = 1; |
| 112394 | 112448 | } |
| 112395 | 112449 | } |
| 112450 | + assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 ); |
| 112396 | 112451 | |
| 112397 | 112452 | /* Generate code to evaluate all constraint terms using == or IN |
| 112398 | 112453 | ** and store the values of those terms in an array of registers |
| 112399 | 112454 | ** starting at regBase. |
| 112400 | 112455 | */ |
| 112401 | 112456 | |