Avoid deleting substructure of the Expr node in lookupName() until after
the error message is generated. FossilOrigin-Name: b8e717663957dfd84e580bf21bc8e8881b33fdb94a2cc0c664a230e54d5e5076
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
C Progress\stoward\sa\sworking\sUSING\sfor\sFULL\sJOIN.
|
||||
D 2022-04-15T19:27:02.160
|
||||
C Avoid\sdeleting\ssubstructure\sof\sthe\sExpr\snode\sin\slookupName()\suntil\safter\nthe\serror\smessage\sis\sgenerated.
|
||||
D 2022-04-15T19:49:28.612
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -550,7 +550,7 @@ F src/pragma.h e690a356c18e98414d2e870ea791c1be1545a714ba623719deb63f7f226d8bb7
|
||||
F src/prepare.c fd940149c691684e7c1073c3787a7170e44852b02d1275d2e30a5b58e89cfcaf
|
||||
F src/printf.c 05d8dfd2018bc4fc3ddb8b37eb97ccef7abf985643fa1caebdcf2916ca90fa32
|
||||
F src/random.c 097dc8b31b8fba5a9aca1697aeb9fd82078ec91be734c16bffda620ced7ab83c
|
||||
F src/resolve.c 7ed7a871146da603301ad1d5874a650c855f242a28af8b8a55c921003a142673
|
||||
F src/resolve.c ecd1623bf1737c755eedea91761f715c7fd7fb9fe75f8852a59c69ed7eabe23d
|
||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||
F src/select.c d36cf25d63f1a2f2dd342cf4ade0d8b14e9ade92b3617627ecc7609d3cf7b624
|
||||
F src/shell.c.in eb7f10d5e2c47bd014d92ec5db1def21fcc1ed56ffaaa4ee715b6c37c370b47f
|
||||
@@ -1947,8 +1947,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 91530990e018580ec5322ace6f0c369a32a3529a0bfb4defb25ca20223a2a80f
|
||||
R 614ceffda705b0fa9287c7a51b45e503
|
||||
P fed2646adecb0a05dd674dc1cd2c0ae205078fe552ba93b8d68891c728c67637
|
||||
R 1c50cd468ee936498b2b4c9dc93da894
|
||||
U drh
|
||||
Z d653e8290a074ee40bf85ba696b38740
|
||||
Z f18fddb58ed361d0fe042b1d1d670157
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
fed2646adecb0a05dd674dc1cd2c0ae205078fe552ba93b8d68891c728c67637
|
||||
b8e717663957dfd84e580bf21bc8e8881b33fdb94a2cc0c664a230e54d5e5076
|
||||
+7
-10
@@ -663,15 +663,6 @@ static int lookupName(
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove any substructure from pExpr
|
||||
*/
|
||||
if( !ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){
|
||||
sqlite3ExprDelete(db, pExpr->pLeft);
|
||||
pExpr->pLeft = 0;
|
||||
sqlite3ExprDelete(db, pExpr->pRight);
|
||||
pExpr->pRight = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** cnt==0 means there was not match.
|
||||
** cnt>1 means there were two or more matches.
|
||||
@@ -727,10 +718,16 @@ static int lookupName(
|
||||
}
|
||||
|
||||
pExpr->op = eNewExprOp;
|
||||
ExprSetProperty(pExpr, EP_Leaf);
|
||||
lookupname_end:
|
||||
if( cnt==1 ){
|
||||
assert( pNC!=0 );
|
||||
if( !ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){
|
||||
sqlite3ExprDelete(db, pExpr->pLeft);
|
||||
pExpr->pLeft = 0;
|
||||
sqlite3ExprDelete(db, pExpr->pRight);
|
||||
pExpr->pRight = 0;
|
||||
ExprSetProperty(pExpr, EP_Leaf);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_AUTHORIZATION
|
||||
if( pParse->db->xAuth
|
||||
&& (pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER)
|
||||
|
||||
Reference in New Issue
Block a user