Remove ALWAYS() macros that can be true if the internal test function

implies_nonnull_row() is used in the result set of a query and contains
comparison operator against a computed column.
dbsqlfuzz 4c34db5bff6247f33ee49e341a1f3018e72be0a0.

FossilOrigin-Name: 4d1dbfa35c7dc0f09321b2e274a00e506f4ca65322454652d5891d815a6966d3
This commit is contained in:
drh 2021-07-29 00:33:20 +00:00
parent 779e990629
commit 02a9996e40
3 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
C Add\stest\scase\sto\sensure\sthat\ssessions\sworks\swith\sDELETE\sstatements\sthat\suse\sthe\struncate\soptimization\s(i.e.\sa\sDELETE\swithout\sa\sWHERE\sclause).
D 2021-07-28T18:13:28.074
C Remove\sALWAYS()\smacros\sthat\scan\sbe\strue\sif\sthe\sinternal\stest\sfunction\nimplies_nonnull_row()\sis\sused\sin\sthe\sresult\sset\sof\sa\squery\sand\scontains\ncomparison\soperator\sagainst\sa\scomputed\scolumn.\ndbsqlfuzz\s4c34db5bff6247f33ee49e341a1f3018e72be0a0.
D 2021-07-29T00:33:20.860
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -496,7 +496,7 @@ F src/date.c e0632f335952b32401482d099321bbf12716b29d6e72836b53ae49683ebae4bf
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
F src/dbstat.c 3aa79fc3aed7ce906e4ea6c10e85d657299e304f6049861fe300053ac57de36c
F src/delete.c 62451bba9fe641159e9c0b7d9d2bab1c48d0cff11e16de2d14000603d2af1fcf
F src/expr.c 62b6d0ac8ee30a4749b78b7b75ae951a911a5d49321af5fe41c05af4df9e7537
F src/expr.c b1bcf90afb7dcc0fae4d81116177e3d02e0803f81fd543c10fcd0691390b6adf
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
F src/fkey.c e9063648396c58778f77583a678342fe4a9bc82436bf23c5f9f444f2df0fdaa4
F src/func.c c224240cbc97fa5e9c4fe9acb128716cb835ca045532bca6951b7c45b020c56c
@ -1920,7 +1920,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 e9719f975f61c4c9f40ea077b049eed97d0957b925a4b6149d9ee21ce827b6a1
R 965bb65399cafcbf059e35da2cd76d6c
U dan
Z 2c36fca53731dd91ccb072aba7586086
P a2fc531177c3a061f2881198bb711d502db7cd831351b6a5dd415936845b6625
R 302893be0ad635d55b2ba074ef459057
U drh
Z 214bc8f469ab254a07e1605231d14a09

View File

@ -1 +1 @@
a2fc531177c3a061f2881198bb711d502db7cd831351b6a5dd415936845b6625
4d1dbfa35c7dc0f09321b2e274a00e506f4ca65322454652d5891d815a6966d3

View File

@ -5681,9 +5681,9 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){
testcase( pExpr->op==TK_GE );
/* The y.pTab=0 assignment in wherecode.c always happens after the
** impliesNotNullRow() test */
if( (pLeft->op==TK_COLUMN && ALWAYS(pLeft->y.pTab!=0)
if( (pLeft->op==TK_COLUMN && pLeft->y.pTab!=0
&& IsVirtual(pLeft->y.pTab))
|| (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0)
|| (pRight->op==TK_COLUMN && pRight->y.pTab!=0
&& IsVirtual(pRight->y.pTab))
){
return WRC_Prune;