Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch dead-end Excluding Merge-Ins
This is equivalent to a diff from d26fdfa3bc to 12d2cf8871
2019-08-26
| ||
20:41 | Merge in recent fixes from trunk. (Closed-Leaf check-in: ad816d01d4 user: drh tags: nulls-last) | |
2019-08-23
| ||
21:11 | Attempt to parse the NULLS LAST clause more efficiently. A few cycles were saved, but at the expense of more code. And there is a bug was introduced somewhere. Not worth continuing down this line. (Closed-Leaf check-in: 12d2cf8871 user: drh tags: dead-end) | |
20:33 | Move some things in parse.y so that TK_COLUMN and TK_AGG_COLUMN are assigned the same values as they are on trunk for a very small speedup. (check-in: d26fdfa3bc user: dan tags: nulls-last) | |
17:09 | Revise the VDBE comments for NULL-scan so that they also work make sense when reading a NULLS FIRST plan. (check-in: bfe793780f user: drh tags: nulls-last) | |
Changes to src/build.c.
︙ | |||
3158 3159 3160 3161 3162 3163 3164 | 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 | - - + + + - + | ** an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in ** pParse and return non-zero. Otherwise, return zero. */ int sqlite3HasExplicitNulls(Parse *pParse, ExprList *pList){ if( pList ){ int i; for(i=0; i<pList->nExpr; i++){ |
︙ | |||
3388 3389 3390 3391 3392 3393 3394 | 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 | - + | Column *pCol = &pTab->aCol[pTab->nCol-1]; pCol->colFlags |= COLFLAG_UNIQUE; sqlite3TokenInit(&prevCol, pCol->zName); pList = sqlite3ExprListAppend(pParse, 0, sqlite3ExprAlloc(db, TK_ID, &prevCol, 0)); if( pList==0 ) goto exit_create_index; assert( pList->nExpr==1 ); |
︙ |
Changes to src/expr.c.
︙ | |||
1409 1410 1411 1412 1413 1414 1415 | 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 | - | pNewExpr->pLeft = pPriorSelectCol; } } pItem->zName = sqlite3DbStrDup(db, pOldItem->zName); pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan); pItem->sortFlags = pOldItem->sortFlags; pItem->done = 0; |
︙ | |||
1661 1662 1663 1664 1665 1666 1667 | 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 | - + - - - - - + - - - + - - - - - - - - - - - - - | sqlite3IdListDelete(db, pColumns); return pList; } /* ** Set the sort order for the last element on the given ExprList. */ |
︙ |
Changes to src/parse.y.
︙ | |||
778 779 780 781 782 783 784 | 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 | - + - + - + - + - - - + + + + + + + - - - - + + - | // sort order. // %type sortlist {ExprList*} %destructor sortlist {sqlite3ExprListDelete(pParse->db, $$);} orderby_opt(A) ::= . {A = 0;} orderby_opt(A) ::= ORDER BY sortlist(X). {A = X;} |
︙ | |||
1343 1344 1345 1346 1347 1348 1349 | 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 | - + | Parse *pParse, ExprList *pPrior, Token *pIdToken, int hasCollate, int sortOrder ){ ExprList *p = sqlite3ExprListAppend(pParse, pPrior, 0); |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
1843 1844 1845 1846 1847 1848 1849 | 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 | - - - + + + + + | int (*xCmp)(void*,int, const void*, int, const void*); void (*xDel)(void*); /* Destructor for pUser */ }; /* ** A sort order can be either ASC or DESC. */ |
︙ | |||
2606 2607 2608 2609 2610 2611 2612 | 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 | - | char *zName; /* Token associated with this expression */ char *zSpan; /* Original text of the expression */ u8 sortFlags; /* Mask of KEYINFO_ORDER_* flags */ unsigned done :1; /* A flag to indicate when processing is finished */ unsigned bSpanIsTab :1; /* zSpan holds DB.TABLE.COLUMN */ unsigned reusable :1; /* Constant expression is reusable */ unsigned bSorterRef :1; /* Defer evaluation until after sorting */ |
︙ | |||
3887 3888 3889 3890 3891 3892 3893 | 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 | - + | Expr *sqlite3ExprSimplifiedAndOr(Expr*); Expr *sqlite3ExprFunction(Parse*,ExprList*, Token*, int); void sqlite3ExprAssignVarNumber(Parse*, Expr*, u32); void sqlite3ExprDelete(sqlite3*, Expr*); void sqlite3ExprUnmapAndDelete(Parse*, Expr*); ExprList *sqlite3ExprListAppend(Parse*,ExprList*,Expr*); ExprList *sqlite3ExprListAppendVector(Parse*,ExprList*,IdList*,Expr*); |
︙ |