/ Artifact [ce50af6b]
Login

Artifact ce50af6bfecef0870d14bcfca8b6511fe3a1e031:

Ticket change [ce50af6b] - New ticket [d11a6e90] Query planner fault on three-way nested join. by drh 2014-09-20 17:05:39.
D 2014-09-20T17:05:39.689
J foundin 3.8.6
J icomment The\sSELECT\sstatement\sat\sthe\send\sof\sthe\sfollowing\sSQL\scode\scauses\san\sassertion\r\nfault\sif\sassertions\sare\senabled,\sor\sgives\sthe\serror\s"1st\sORDER\sBY\sterm\sout\r\nof\srange\s-\sshould\sbe\sbetween\s1\sand\s1"\sif\sasserts\sare\sdisabled.\r\n\r\n<blockquote><verbatim>\r\nCREATE\sTABLE\st1\s(id\sINTEGER\sPRIMARY\sKEY,\sdata\sTEXT);\r\nINSERT\sINTO\st1(id,data)\sVALUES(9,'nine-a');\r\nINSERT\sINTO\st1(id,data)\sVALUES(10,'ten-a');\r\nINSERT\sINTO\st1(id,data)\sVALUES(11,'eleven-a');\r\nCREATE\sTABLE\st2\s(id\sINTEGER\sPRIMARY\sKEY,\sdata\sTEXT);\r\nINSERT\sINTO\st2(id,data)\sVALUES(9,'nine-b');\r\nINSERT\sINTO\st2(id,data)\sVALUES(10,'ten-b');\r\nINSERT\sINTO\st2(id,data)\sVALUES(11,'eleven-b');\r\n\r\nSELECT\sid\sFROM\s(\r\n\s\sSELECT\sid,data\sFROM\s(\r\n\s\s\s\s\sSELECT\s*\sFROM\st1\sUNION\sALL\sSELECT\s*\sFROM\st2\r\n\s\s)\r\n\s\sWHERE\sid=10\sORDER\sBY\sdata\r\n);\r\n</verbatim></blockquote>\r\n\r\nBisecting\sshows\sthat\sthis\sproblem\swas\sintroduced\sby\scheck-in\s[a49e909c8738317]\r\non\s2012-04-27\sand\sfirst\sappeared\sin\sSQLite\srelease\s3.7.12.\s\sThe\sproblem\swas\r\noriginally\sdetected\sby\sYuanzhong\sXu\sand\sreported\son\sthe\ssqlite-users\smailing\r\nlist.
J login drh
J mimetype text/x-fossil-wiki
J severity Severe
J status Open
J title Query\splanner\sfault\son\sthree-way\snested\sjoin
J type Code_Defect
K d11a6e908f8bb04ddf0de0f95b9229ddaad2fd85
U drh
Z ad1157e613b2c8557b772b171398b051