Remove some redundant code: Call sqlite3ResolveExprListNames() rather than
calling sqlite3ResolveExprNames() in a loop - in two places. FossilOrigin-Name: bdaf66465b6b1bdad10c08d9527b98e7000a41e4
This commit is contained in:
parent
108aa00a87
commit
fea870be38
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
|||||||
C Enhances\sthe\sparser\sso\sthat\sit\saccepts\sarbitrary\sexpressions\sfor\sthe\sarguments\nof\san\sindex,\sthough\sthe\scode\sgenerator\sstill\srejects\severything\sother\sthan\nsimple\scolumn\snames.\s\sThe\ssqlite3RestrictColumnListSyntax()\sroutine\sis\sremoved\nsince\sthat\sfeature\sis\snow\shandled\sby\sthe\sparser.
|
C Remove\ssome\sredundant\scode:\s\sCall\ssqlite3ResolveExprListNames()\srather\sthan\ncalling\ssqlite3ResolveExprNames()\sin\sa\sloop\s-\sin\stwo\splaces.
|
||||||
D 2015-08-24T20:21:20.985
|
D 2015-08-24T20:54:06.120
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in e2218eb228374422969de7b1680eda6864affcef
|
F Makefile.in e2218eb228374422969de7b1680eda6864affcef
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@ -297,7 +297,7 @@ F src/global.c 508e4087f7b41d688e4762dcf4d4fe28cfbc87f9
|
|||||||
F src/hash.c 4263fbc955f26c2e8cdc0cf214bc42435aa4e4f5
|
F src/hash.c 4263fbc955f26c2e8cdc0cf214bc42435aa4e4f5
|
||||||
F src/hash.h c8f3c31722cf3277d03713909761e152a5b81094
|
F src/hash.h c8f3c31722cf3277d03713909761e152a5b81094
|
||||||
F src/hwtime.h d32741c8f4df852c7d959236615444e2b1063b08
|
F src/hwtime.h d32741c8f4df852c7d959236615444e2b1063b08
|
||||||
F src/insert.c 842026863c726df5420f896a8c10eb3e150f9864
|
F src/insert.c ad9ebaafdc4438bb0de58cd7d6bc199fb5b6917a
|
||||||
F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
|
F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
|
||||||
F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e
|
F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e
|
||||||
F src/lempar.c 92bafa308607dd985ca389a788cd9e0a2b608712
|
F src/lempar.c 92bafa308607dd985ca389a788cd9e0a2b608712
|
||||||
@ -335,7 +335,7 @@ F src/pragma.h 631a91c8b0e6ca8f051a1d8a4a0da4150e04620a
|
|||||||
F src/prepare.c 82e5db1013846a819f198336fed72c44c974e7b1
|
F src/prepare.c 82e5db1013846a819f198336fed72c44c974e7b1
|
||||||
F src/printf.c 2bc439ff20a4aad0e0ad50a37a67b5eae7d20edc
|
F src/printf.c 2bc439ff20a4aad0e0ad50a37a67b5eae7d20edc
|
||||||
F src/random.c ba2679f80ec82c4190062d756f22d0c358180696
|
F src/random.c ba2679f80ec82c4190062d756f22d0c358180696
|
||||||
F src/resolve.c 7a67cd2aebc9a9eeecd1d104eb6a9237388eb452
|
F src/resolve.c 66b2740075fdb8baf90155180d33d9850cbcc976
|
||||||
F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e
|
F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e
|
||||||
F src/select.c da6d1e7a4f1c8d713ed5415b5ed21d82ef465c0f
|
F src/select.c da6d1e7a4f1c8d713ed5415b5ed21d82ef465c0f
|
||||||
F src/shell.c b1f91e60918df3a68efad1e3a11696b9a7e23d23
|
F src/shell.c b1f91e60918df3a68efad1e3a11696b9a7e23d23
|
||||||
@ -1379,7 +1379,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||||
P d794b34da6f9c77dfe17773b0b17b22de72cce7f
|
P bed42116addabcf3dfdc2e2d51ae183965704988
|
||||||
R 551ba7ed9667cd3021493a6e99ba80fb
|
R 455d327d4502b1aadc3594ff31ef63f2
|
||||||
U drh
|
U drh
|
||||||
Z 12005a1b68dc81ba8d64d2d3b63a147c
|
Z 983b791d1ba8013f2148572b484fe05d
|
||||||
|
@ -1 +1 @@
|
|||||||
bed42116addabcf3dfdc2e2d51ae183965704988
|
bdaf66465b6b1bdad10c08d9527b98e7000a41e4
|
@ -705,11 +705,13 @@ void sqlite3Insert(
|
|||||||
sNC.pParse = pParse;
|
sNC.pParse = pParse;
|
||||||
srcTab = -1;
|
srcTab = -1;
|
||||||
assert( useTempTable==0 );
|
assert( useTempTable==0 );
|
||||||
nColumn = pList ? pList->nExpr : 0;
|
if( pList ){
|
||||||
for(i=0; i<nColumn; i++){
|
nColumn = pList->nExpr;
|
||||||
if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
|
if( sqlite3ResolveExprListNames(&sNC, pList) ){
|
||||||
goto insert_cleanup;
|
goto insert_cleanup;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
nColumn = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1507,7 +1507,6 @@ void sqlite3ResolveSelfReference(
|
|||||||
){
|
){
|
||||||
SrcList sSrc; /* Fake SrcList for pParse->pNewTable */
|
SrcList sSrc; /* Fake SrcList for pParse->pNewTable */
|
||||||
NameContext sNC; /* Name context for pParse->pNewTable */
|
NameContext sNC; /* Name context for pParse->pNewTable */
|
||||||
int i; /* Loop counter */
|
|
||||||
|
|
||||||
assert( type==NC_IsCheck || type==NC_PartIdx );
|
assert( type==NC_IsCheck || type==NC_PartIdx );
|
||||||
memset(&sNC, 0, sizeof(sNC));
|
memset(&sNC, 0, sizeof(sNC));
|
||||||
@ -1520,11 +1519,5 @@ void sqlite3ResolveSelfReference(
|
|||||||
sNC.pSrcList = &sSrc;
|
sNC.pSrcList = &sSrc;
|
||||||
sNC.ncFlags = type;
|
sNC.ncFlags = type;
|
||||||
if( sqlite3ResolveExprNames(&sNC, pExpr) ) return;
|
if( sqlite3ResolveExprNames(&sNC, pExpr) ) return;
|
||||||
if( pList ){
|
if( pList ) sqlite3ResolveExprListNames(&sNC, pList);
|
||||||
for(i=0; i<pList->nExpr; i++){
|
|
||||||
if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user