]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix to the coalesce() function generation in the resolver.
authordrh <>
Mon, 18 Apr 2022 00:57:11 +0000 (00:57 +0000)
committerdrh <>
Mon, 18 Apr 2022 00:57:11 +0000 (00:57 +0000)
FossilOrigin-Name: 584bd55e20669d09b7efe3429ba847c42c32fb1eb960784c4e0dedcd96899313

manifest
manifest.uuid
src/resolve.c

index e68f297a3ce9885c3d0f8eeae233a1245591f750..4dd366865483d11994c25b882346d73081a2d1bb 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C When\sconverting\sa\sNATURAL\sJOIN\sinto\sa\sJOIN\sUSING,\smake\ssure\sto\sinsert\sthe\nname\scorrectly\sinto\sthe\sIdList\seven\sif\sit\sis\sa\swierd\squoted\sname.
-D 2022-04-18T00:04:15.097
+C Fix\sto\sthe\scoalesce()\sfunction\sgeneration\sin\sthe\sresolver.
+D 2022-04-18T00:57:11.470
 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 c6591eb339fb21e907485020cb2b7967a6ebd61533bec8841fb12d154e99a7fa
+F src/resolve.c ce4cb0889f1bf5990b698740b88026385cf6f30222fde1f02a3168bb780eb579
 F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
 F src/select.c fcfa9e78068a9b7e7e8ae5e99dd9ad67b494f8af494c83d608e22bf3a24dc1a2
 F src/shell.c.in eb7f10d5e2c47bd014d92ec5db1def21fcc1ed56ffaaa4ee715b6c37c370b47f
@@ -1948,8 +1948,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 20388548d868511f8c8437718985d75fe9801835811fec716f1700727b9aa367
-R 47315d601cc104e0c12b223bfb8b1dba
+P e62156b696f2496e2697cb3b46f136551b58644e2a5824aa3d759596694b2f4b
+R bdbe7ed2c4fc36f304a762252cc7a276
 U drh
-Z 7934b697ad8bfcf0f014801a6142f07d
+Z c9db4d2e3dbbaf57eb9975f4478e4f80
 # Remove this line to create a well-formed Fossil manifest.
index 77981c4449d7bdd2f9df4a1e73aafbaac1e24543..d3f35cd80ed18f169749c144788e827ae78cf1d2 100644 (file)
@@ -1 +1 @@
-e62156b696f2496e2697cb3b46f136551b58644e2a5824aa3d759596694b2f4b
\ No newline at end of file
+584bd55e20669d09b7efe3429ba847c42c32fb1eb960784c4e0dedcd96899313
\ No newline at end of file
index d114dfc467dab72ff7908669cca55fe1bca2f1e0..76e635acffe9f31515eda5cfa6e90f83349df2d6 100644 (file)
@@ -205,11 +205,9 @@ static void extendFJMatch(
 ){
   Expr *pNew = sqlite3ExprAlloc(pParse->db, TK_COLUMN, 0, 0);
   if( pNew ){
-    Table *pTab;
     pNew->iTable = pMatch->iCursor;
-    assert( ExprUseYTab(pNew) );
-    pTab = pNew->y.pTab = pMatch->pTab;
-    pNew->iColumn = iColumn==pTab->iPKey ? -1 : iColumn;
+    pNew->iColumn = iColumn;
+    pNew->y.pTab = pMatch->pTab;
     assert( (pMatch->fg.jointype & (JT_LEFT|JT_LTORJ))!=0 );
     ExprSetProperty(pNew, EP_CanBeNull);
     *ppList = sqlite3ExprListAppend(pParse, *ppList, pNew);
@@ -342,7 +340,7 @@ static int lookupName(
                   pFJMatch = 0;
                 }else{
                   /* For a FULL JOIN, we must construct a coalesce() func */
-                  extendFJMatch(pParse, &pFJMatch, pMatch, j);
+                  extendFJMatch(pParse, &pFJMatch, pMatch, pExpr->iColumn);
                 }
               }
               cnt++;
@@ -396,7 +394,7 @@ static int lookupName(
                 pFJMatch = 0;
               }else{
                 /* For a FULL JOIN, we must construct a coalesce() func */
-                extendFJMatch(pParse, &pFJMatch, pMatch, j);
+                extendFJMatch(pParse, &pFJMatch, pMatch, pExpr->iColumn);
               }
             }
             cnt++;