/ Artifact Content
Login

Artifact 2274c85b7a4eeb2a510faef879db2d55fbe207854951fe7ef9e548c8af9f1ae1:

Ticket change [2274c85b] - New ticket [1dcb4d44] Incorrect query result when redundant terms appears in WHERE clause. by drh 2020-02-13 20:37:37.
D 2020-02-13T20:37:37.591
J icomment The\sfollowing\sSQL\sgenerates\san\sextra,\sincorrect\sresult\srow:\r\n\r\n<blockquote><verbatim>\r\nCREATE\sTABLE\st1(x\sTEXT);\r\nCREATE\sTABLE\st2(y\sTEXT);\r\nINSERT\sINTO\st1\sVALUES('good'),('bad');\r\nINSERT\sINTO\st2\sVALUES('good'),('bad');\r\nSELECT\s*\sFROM\st1\sJOIN\st2\sON\sx=y\r\n\sWHERE\sx='good'\sAND\sy='good';\r\n</verbatim></blockquote>\r\n\r\nThis\sproblem\swas\sreported\son\sthe\smailing\slist\sby\sJim\sBosch.\s\sBisecting\sshows\r\nthat\sthe\smalfunction\swas\sintroduced\sby\scheck-in\s[1c3e5c20a9e6f501]\son\r\n2020-01-08.\sThat\scheck-in\sappears\sin\sversions\s3.31.0\sand\s3.31.1.
J login drh
J mimetype text/x-fossil-wiki
J severity Minor
J status Open
J title Incorrect\squery\sresult\swhen\sredundant\sterms\sappears\sin\sWHERE\sclause
J type Code_Defect
K 1dcb4d44964846ad56e8cc74655f1d61d6e7f59b
U drh
Z 4274980b48b2ecc4055a06a7556ff2d3