Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch desc-orderby-fix-1 Excluding Merge-Ins
This is equivalent to a diff from f9027cb4 to 7e7356f1
2013-03-13
| ||
00:13 | Fix the ORDER BY with IN constraint logic so that it works with all combinations of DESC on the ORDER BY clause, on the RHS of the IN operator, and in the index used by ORDER BY and IN. Fix for ticket [4dd95f6943fbd18]. (check-in: 839aa91f user: drh tags: trunk) | |
2013-03-12
| ||
23:58 | Add a single new test case to the ORDER BY with IN logic verify that if the RHS of the IN is a descending index that it still works. Add testcase() macros to the ORDER BY with IN logic to help verify that corner cases are tested. (Closed-Leaf check-in: 7e7356f1 user: drh tags: desc-orderby-fix-1) | |
23:03 | Fix typo in sqlite3_close() function documentation reported on the mailing list. (check-in: c9a75d89 user: mistachkin tags: trunk) | |
22:13 | Fix a test case that had an ambiguous result. (check-in: 38c6bddf user: drh tags: desc-orderby-fix-1) | |
20:58 | Fix typo in sqlite3_close() function documentation reported on the mailing list. (Closed-Leaf check-in: 7232093d user: mistachkin tags: docTypo) | |
18:34 | A proposed fix for the DESC ORDER BY bug of ticket [4dd95f6943fbd18]. Seems to work, but lots more testing is needed prior to moving to trunk. (check-in: 614a038a user: drh tags: desc-orderby-fix-1) | |
11:38 | Merge recent changes to trunk into sessions branch. (check-in: 62adb0e0 user: dan tags: sessions) | |
2013-03-11
| ||
13:37 | Define _BSD_SOURCE when building on OpenBSD. This is required for fchmod(). (check-in: f9027cb4 user: dan tags: trunk) | |
11:57 | Fixes for compiling with SQLITE_OMIT_AUTOVACUUM and/or SQLITE_OMIT_TRIGGER defined. (check-in: 1da15adb user: dan tags: trunk) | |
Changes to src/expr.c.
︙ | |||
1452 1453 1454 1455 1456 1457 1458 | 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 | - - - - + + + + + | ** all members of the RHS set, skipping duplicates. ** ** A cursor is opened on the b-tree object that the RHS of the IN operator ** and pX->iTable is set to the index of that cursor. ** ** The returned value of this function indicates the b-tree type, as follows: ** |
︙ | |||
1578 1579 1580 1581 1582 1583 1584 | 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 | + - + | pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx); iAddr = sqlite3CodeOnce(pParse); sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb, pKey,P4_KEYINFO_HANDOFF); VdbeComment((v, "%s", pIdx->zName)); assert( IN_INDEX_INDEX_DESC == IN_INDEX_INDEX_ASC+1 ); |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
3259 3260 3261 3262 3263 3264 3265 | 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 | - + + | #else #define sqlite3BeginBenignMalloc() #define sqlite3EndBenignMalloc() #endif #define IN_INDEX_ROWID 1 #define IN_INDEX_EPH 2 |
︙ |
Changes to src/where.c.
︙ | |||
3771 3772 3773 3774 3775 3776 3777 | 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 | - + + + + + + + + + + + + + + + | ** For a constraint of the form X=expr, the expression is evaluated and its ** result is left on the stack. For constraints of the form X IN (...) ** this routine sets up a loop that will iterate over all values of X. */ static int codeEqualityTerm( Parse *pParse, /* The parsing context */ WhereTerm *pTerm, /* The term of the WHERE clause to be coded */ |
︙ | |||
3908 3909 3910 3911 3912 3913 3914 | 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 | - + | int k = pIdx->aiColumn[j]; pTerm = findTerm(pWC, iCur, k, notReady, pLevel->plan.wsFlags, pIdx); if( pTerm==0 ) break; /* The following true for indices with redundant columns. ** Ex: CREATE INDEX i1 ON t1(a,b,a); SELECT * FROM t1 WHERE a=0 AND b=0; */ testcase( (pTerm->wtFlags & TERM_CODED)!=0 ); testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */ |
︙ | |||
4185 4186 4187 4188 4189 4190 4191 | 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 | - + | addrNotFound = pLevel->addrBrk; for(j=1; j<=nConstraint; j++){ for(k=0; k<nConstraint; k++){ if( aUsage[k].argvIndex==j ){ int iTarget = iReg+j+1; pTerm = &pWC->a[aConstraint[k].iTermOffset]; if( pTerm->eOperator & WO_IN ){ |
︙ | |||
4226 4227 4228 4229 4230 4231 4232 | 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 | - + | */ iReleaseReg = sqlite3GetTempReg(pParse); pTerm = findTerm(pWC, iCur, -1, notReady, WO_EQ|WO_IN, 0); assert( pTerm!=0 ); assert( pTerm->pExpr!=0 ); assert( omitTable==0 ); testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */ |
︙ |
Changes to test/descidx3.test.
︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - + - - + + | } {9 7 6 8 3 4 2 5} ifcapable subquery { # If the subquery capability is not compiled in to the binary, then # the IN(...) operator is not available. Hence these tests cannot be # run. do_test descidx3-4.1 { |
︙ |
Added test/tkt-4dd95f6943.test.