Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add test script shell6.test, containing tests for schemalint. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | schemalint |
Files: | files | file ages | folders |
SHA1: |
0b73406595c9a077399b0f4c17af3a82 |
User & Date: | dan 2016-02-22 19:51:08.971 |
Context
2016-03-09
| ||
08:07 | Fix a problem in the schemalint code that comes up when a sub-query uses one or more of the same tables as its parent. (check-in: fc18cc9293 user: dan tags: schemalint) | |
2016-02-22
| ||
19:51 | Add test script shell6.test, containing tests for schemalint. (check-in: 0b73406595 user: dan tags: schemalint) | |
2016-02-19
| ||
07:53 | Fix a couple of bugs in the schemalint code. (check-in: 02fbf699c0 user: dan tags: schemalint) | |
Changes
Changes to src/shell_indexes.c.
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | */ struct IdxConstraint { char *zColl; /* Collation sequence */ int bRange; /* True for range, false for eq */ int iCol; /* Constrained table column */ i64 depmask; /* Dependency mask */ int bFlag; /* Used by idxFindCompatible() */ int bDesc; /* True if ORDER BY <expr> DESC */ IdxConstraint *pNext; /* Next constraint in pEq or pRange list */ IdxConstraint *pLink; /* See above */ }; /* ** A WHERE clause. Made up of IdxConstraint objects. Example WHERE clause: ** |
︙ | |||
194 195 196 197 198 199 200 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | - + + - - + + + + + + + | p->pScan = pNew; p->pCurrent = &pNew->where; break; } case SQLITE_WHEREINFO_ORDERBY: { IdxConstraint *pNew = idxNewConstraint(&p->rc, zVal); |
︙ | |||
504 505 506 507 508 509 510 511 512 513 514 515 516 517 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | + + + + | if( sqlite3_stricmp(p->zColl, pCons->zColl) ){ if( idxIdentifierRequiresQuotes(pCons->zColl) ){ zRet = idxAppendText(pRc, zRet, " COLLATE %Q", pCons->zColl); }else{ zRet = idxAppendText(pRc, zRet, " COLLATE %s", pCons->zColl); } } if( pCons->bDesc ){ zRet = idxAppendText(pRc, zRet, " DESC"); } return zRet; } /* ** Search database dbm for an index compatible with the one idxCreateFromCons() ** would create from arguments pScan, pEq and pTail. If no error occurs and ** such an index is found, return non-zero. Or, if no such index is found, |
︙ | |||
808 809 810 811 812 813 814 | 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 | - + + + | if( memcmp(&zDetail[i], " USING INDEX ", 13)==0 ){ zIdx = &zDetail[i+13]; }else if( memcmp(&zDetail[i], " USING COVERING INDEX ", 22)==0 ){ zIdx = &zDetail[i+22]; } if( zIdx ){ int nIdx = 0; |
︙ |
Changes to src/where.c.
︙ | |||
3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 | 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 | + - - + + + | /* ORDER BY callbacks */ if( p->pOrderBy ){ int i; int bFirst = 1; for(i=0; i<p->pOrderBy->nExpr; i++){ Expr *pExpr = p->pOrderBy->a[i].pExpr; CollSeq *pColl = sqlite3ExprCollSeq(pParse, pExpr); assert( pColl || pParse->rc ); pExpr = sqlite3ExprSkipCollate(pExpr); if( pExpr->op==TK_COLUMN && pExpr->iTable==pItem->iCursor ){ int iCol = pExpr->iColumn; |
︙ |
Added test/shell6.test.