Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch affinity-func Excluding Merge-Ins
This is equivalent to a diff from bce3f04186 to 80889306bf
2015-06-02
| ||
16:19 | Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB to avoid confusion with "no affinity". (check-in: 29ad9e9173 user: drh tags: trunk) | |
16:09 | Add the built-in affinity() SQL function. This turns out to be not as useful as originally envisioned, so abandon it on a branch. (Leaf check-in: 80889306bf user: drh tags: affinity-func) | |
15:32 | Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB. (Closed-Leaf check-in: bce3f04186 user: drh tags: blob-affinity-rename) | |
14:02 | Fix a faulty assert() in btree.c. Update the database fuzz test file with new test cases. (check-in: 4e621af134 user: drh tags: trunk) | |
Changes to src/expr.c.
︙ | |||
2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 | 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 | + + + + + + + + + + + + + + + + | ** of the first argument. */ if( pDef->funcFlags & SQLITE_FUNC_UNLIKELY ){ assert( nFarg>=1 ); sqlite3ExprCode(pParse, pFarg->a[0].pExpr, target); break; } /* The AFFINITY() function returns the type affinity of its argument. ** The type affinity is a compile-time value, so we might as well ** code it directly. */ if( pDef->funcFlags & SQLITE_FUNC_AFFINITY ){ int aff; static const char *const azAffName[] = { "", "BLOB", "TEXT", "NUMERIC", "INTEGER", "REAL" }; assert( nFarg==1 ); aff = sqlite3ExprAffinity(pFarg->a[0].pExpr); if( aff ) aff -= SQLITE_AFF_BLOB - 1; sqlite3VdbeAddOp4(v, OP_String8, 0, target, 0, azAffName[aff], 0); break; } for(i=0; i<nFarg; i++){ if( i<32 && sqlite3ExprIsConstant(pFarg->a[i].pExpr) ){ testcase( i==31 ); constMask |= MASKBIT32(i); } if( (pDef->funcFlags & SQLITE_FUNC_NEEDCOLL)!=0 && !pColl ){ |
︙ |
Changes to src/func.c.
︙ | |||
1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 | 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 | + | AGGREGATE2(min, 1, 0, 1, minmaxStep, minMaxFinalize, SQLITE_FUNC_MINMAX ), FUNCTION(max, -1, 1, 1, minmaxFunc ), FUNCTION(max, 0, 1, 1, 0 ), AGGREGATE2(max, 1, 1, 1, minmaxStep, minMaxFinalize, SQLITE_FUNC_MINMAX ), FUNCTION2(typeof, 1, 0, 0, typeofFunc, SQLITE_FUNC_TYPEOF), FUNCTION2(affinity, 1, 0, 0, noopFunc, SQLITE_FUNC_AFFINITY), FUNCTION2(length, 1, 0, 0, lengthFunc, SQLITE_FUNC_LENGTH), FUNCTION(instr, 2, 0, 0, instrFunc ), FUNCTION(substr, 2, 0, 0, substrFunc ), FUNCTION(substr, 3, 0, 0, substrFunc ), FUNCTION(printf, -1, 0, 0, printfFunc ), FUNCTION(unicode, 1, 0, 0, unicodeFunc ), FUNCTION(char, -1, 0, 0, charFunc ), |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
1344 1345 1346 1347 1348 1349 1350 | 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 | - - - - - - - - - - - - + + + + + + + + + + + + + | }; /* ** Possible values for FuncDef.flags. Note that the _LENGTH and _TYPEOF ** values must correspond to OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG. There ** are assert() statements in the code to verify this. */ |
︙ |
Added test/affinity1.test.