Optimization to sqlite3WhereExprUsage().

FossilOrigin-Name: 95493058fcf40306727a281f21c5a2a0011b7d02
This commit is contained in:
drh 2016-08-10 20:02:21 +00:00
parent e104dd3cc3
commit 93ca3933d1
3 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C List\sof\sMATCH\soperator\snames\sin\sisMatchOfColumn()\sshould\sbe\sconstant.
D 2016-08-10T19:43:29.424
C Optimization\sto\ssqlite3WhereExprUsage().
D 2016-08-10T20:02:21.519
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
@ -467,7 +467,7 @@ F src/walker.c 2d2cc7fb0f320f7f415215d7247f3c584141ac09
F src/where.c 5c9df42d50888be8274a5a0eb062eb0629869bd3
F src/whereInt.h e5b939701a7ceffc5a3a8188a37f9746416ebcd0
F src/wherecode.c 99707d11907c71d289ee9553d2d1a22f1fd8ba41
F src/whereexpr.c 600e6c619d69f5455dd99c69fec8c42ac44e5c9d
F src/whereexpr.c 98ce9f3b8d92b6f741b9f3498f9619695739256e
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@ -1510,7 +1510,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P ebccbd96094ac64de39dbd0d220d3a7afd8cd40e
R fac33bc7c9b64529fad9a6567bc0fbba
P 7319d676aaf95ba7391379f4cdf193b6aa898893
R 35b146f4e31088e5d413861ddde93f74
U drh
Z d9cf90e53680d487c9bbc0ab8247d4aa
Z 2c745f38c120984510a4f6c92123cc21

View File

@ -1 +1 @@
7319d676aaf95ba7391379f4cdf193b6aa898893
95493058fcf40306727a281f21c5a2a0011b7d02

View File

@ -1275,13 +1275,14 @@ void sqlite3WhereClauseClear(WhereClause *pWC){
** tree.
*/
Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){
Bitmask mask = 0;
Bitmask mask;
if( p==0 ) return 0;
if( p->op==TK_COLUMN ){
mask = sqlite3WhereGetMask(pMaskSet, p->iTable);
return mask;
}
mask = sqlite3WhereExprUsage(pMaskSet, p->pRight);
assert( !ExprHasProperty(p, EP_TokenOnly) );
mask = p->pRight ? sqlite3WhereExprUsage(pMaskSet, p->pRight) : 0;
if( p->pLeft ) mask |= sqlite3WhereExprUsage(pMaskSet, p->pLeft);
if( ExprHasProperty(p, EP_xIsSelect) ){
mask |= exprSelectUsage(pMaskSet, p->x.pSelect);