mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Small size reduction and performance increase in the name resolver routine
for expressions. FossilOrigin-Name: 1a3554e1d71b666325ff377fae5329d79ce5c05f
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Make\sthe\sdefault\sMASK\sargument\sfor\s"PRAGMA\soptimize"\sbe\s0xfffe,\sto\sallow\sfor\nfuture\sexpansion\sof\sup\sto\s14\snew\sdefault-on\soptimizations.
|
C Small\ssize\sreduction\sand\sperformance\sincrease\sin\sthe\sname\sresolver\sroutine\nfor\sexpressions.
|
||||||
D 2017-03-06T23:51:16.804
|
D 2017-03-07T03:25:52.677
|
||||||
F Makefile.in edb6bcdd37748d2b1c3422ff727c748df7ffe918
|
F Makefile.in edb6bcdd37748d2b1c3422ff727c748df7ffe918
|
||||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||||
F Makefile.msc a89ea37ab5928026001569f056973b9059492fe2
|
F Makefile.msc a89ea37ab5928026001569f056973b9059492fe2
|
||||||
@@ -386,7 +386,7 @@ F src/os_win.c 2a6c73eef01c51a048cc4ddccd57f981afbec18a
|
|||||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||||
F src/pager.c ff1232b3088a39806035ecfac4fffeb22717d80b
|
F src/pager.c ff1232b3088a39806035ecfac4fffeb22717d80b
|
||||||
F src/pager.h f2a99646c5533ffe11afa43e9e0bea74054e4efa
|
F src/pager.h f2a99646c5533ffe11afa43e9e0bea74054e4efa
|
||||||
F src/parse.y af8830094f4aecb91cb69721f3601ad10c36abc4
|
F src/parse.y 48b03113704ee8bd78ee6996d81de7fbee22e105
|
||||||
F src/pcache.c 62835bed959e2914edd26afadfecce29ece0e870
|
F src/pcache.c 62835bed959e2914edd26afadfecce29ece0e870
|
||||||
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
|
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
|
||||||
F src/pcache1.c e3967219b2a92b9edcb9324a4ba75009090d3953
|
F src/pcache1.c e3967219b2a92b9edcb9324a4ba75009090d3953
|
||||||
@@ -395,7 +395,7 @@ F src/pragma.h c9c763958fec92b04125571472c9500b351c5f7f
|
|||||||
F src/prepare.c b1140c3d0cf59bc85ace00ce363153041b424b7a
|
F src/prepare.c b1140c3d0cf59bc85ace00ce363153041b424b7a
|
||||||
F src/printf.c 67427bbee66d891fc6f6f5aada857e9cdb368c1c
|
F src/printf.c 67427bbee66d891fc6f6f5aada857e9cdb368c1c
|
||||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||||
F src/resolve.c f9bc0de45a30a450da47b3766de00be89bf9be79
|
F src/resolve.c 3fd6fdb3666f24bbcc15039031d0b19a5e53c901
|
||||||
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
|
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
|
||||||
F src/select.c d12f3539f80db38b09015561b569e0eb1c4b6c5f
|
F src/select.c d12f3539f80db38b09015561b569e0eb1c4b6c5f
|
||||||
F src/shell.c 27d2b31099fd2cd749e44d025ef9b54ca26692cb
|
F src/shell.c 27d2b31099fd2cd749e44d025ef9b54ca26692cb
|
||||||
@@ -1562,7 +1562,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P ec529bf11b16c801ea438e57d208ff7e4cedf1f9
|
P 73019a8bba29fd07f73559cd00d5346fa822b439
|
||||||
R 299bd0d883e4720337a781b64978238c
|
R 1209553f688221f7757a0938ef904e6c
|
||||||
U drh
|
U drh
|
||||||
Z 84b44db3e09ed739373a73b84fb9456e
|
Z 582428290c16e3af0ac541cc18ae2bc9
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
73019a8bba29fd07f73559cd00d5346fa822b439
|
1a3554e1d71b666325ff377fae5329d79ce5c05f
|
||||||
@@ -899,7 +899,7 @@ term(A) ::= INTEGER(X). {
|
|||||||
A.pExpr = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &X, 1);
|
A.pExpr = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &X, 1);
|
||||||
A.zStart = X.z;
|
A.zStart = X.z;
|
||||||
A.zEnd = X.z + X.n;
|
A.zEnd = X.z + X.n;
|
||||||
if( A.pExpr ) A.pExpr->flags |= EP_Leaf;
|
if( A.pExpr ) A.pExpr->flags |= EP_Leaf|EP_Resolved;
|
||||||
}
|
}
|
||||||
expr(A) ::= VARIABLE(X). {
|
expr(A) ::= VARIABLE(X). {
|
||||||
if( !(X.z[0]=='#' && sqlite3Isdigit(X.z[1])) ){
|
if( !(X.z[0]=='#' && sqlite3Isdigit(X.z[1])) ){
|
||||||
|
|||||||
@@ -608,33 +608,38 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
|||||||
#endif /* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT)
|
#endif /* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT)
|
||||||
&& !defined(SQLITE_OMIT_SUBQUERY) */
|
&& !defined(SQLITE_OMIT_SUBQUERY) */
|
||||||
|
|
||||||
/* A lone identifier is the name of a column.
|
/* A column name: ID
|
||||||
*/
|
** Or table name and column name: ID.ID
|
||||||
case TK_ID: {
|
|
||||||
return lookupName(pParse, 0, 0, pExpr->u.zToken, pNC, pExpr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* A table name and column name: ID.ID
|
|
||||||
** Or a database, table and column: ID.ID.ID
|
** Or a database, table and column: ID.ID.ID
|
||||||
|
**
|
||||||
|
** The TK_ID and TK_OUT cases are combined so that there will only
|
||||||
|
** be one call to lookupName(). Then the compiler will in-line
|
||||||
|
** lookupName() for a size reduction and performance increase.
|
||||||
*/
|
*/
|
||||||
|
case TK_ID:
|
||||||
case TK_DOT: {
|
case TK_DOT: {
|
||||||
const char *zColumn;
|
const char *zColumn;
|
||||||
const char *zTable;
|
const char *zTable;
|
||||||
const char *zDb;
|
const char *zDb;
|
||||||
Expr *pRight;
|
Expr *pRight;
|
||||||
|
|
||||||
/* if( pSrcList==0 ) break; */
|
if( pExpr->op==TK_ID ){
|
||||||
notValid(pParse, pNC, "the \".\" operator", NC_IdxExpr);
|
|
||||||
pRight = pExpr->pRight;
|
|
||||||
if( pRight->op==TK_ID ){
|
|
||||||
zDb = 0;
|
zDb = 0;
|
||||||
zTable = pExpr->pLeft->u.zToken;
|
zTable = 0;
|
||||||
zColumn = pRight->u.zToken;
|
zColumn = pExpr->u.zToken;
|
||||||
}else{
|
}else{
|
||||||
assert( pRight->op==TK_DOT );
|
notValid(pParse, pNC, "the \".\" operator", NC_IdxExpr);
|
||||||
zDb = pExpr->pLeft->u.zToken;
|
pRight = pExpr->pRight;
|
||||||
zTable = pRight->pLeft->u.zToken;
|
if( pRight->op==TK_ID ){
|
||||||
zColumn = pRight->pRight->u.zToken;
|
zDb = 0;
|
||||||
|
zTable = pExpr->pLeft->u.zToken;
|
||||||
|
zColumn = pRight->u.zToken;
|
||||||
|
}else{
|
||||||
|
assert( pRight->op==TK_DOT );
|
||||||
|
zDb = pExpr->pLeft->u.zToken;
|
||||||
|
zTable = pRight->pLeft->u.zToken;
|
||||||
|
zColumn = pRight->pRight->u.zToken;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return lookupName(pParse, zDb, zTable, zColumn, pNC, pExpr);
|
return lookupName(pParse, zDb, zTable, zColumn, pNC, pExpr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user