/ Artifact Content
Login

Artifact 67d7ba17159d0bbb520fedf70c8b39de0ad07933d814122096378bd2db2c45fc:

Ticket change [67d7ba17] - New ticket [c41afac3] LIMIT applied globally rather than locally. by drh 2019-05-29 16:04:56.
D 2019-05-29T16:04:56.250
J foundin 3.28.0
J icomment In\sthe\sSQL\sbelow,\sthe\s"LIMIT\s1"\sclause\sends\sup\sbeing\sapplied\sto\sthe\r\nentire\squery,\srather\sthan\sto\sjust\sthe\sone\ssubquery\sto\swhich\sit\sis\sattached.\r\n\r\n<blockquote><verbatim>\r\nCREATE\sTABLE\st1\sAS\sVALUES(1),(2);\r\nCREATE\sTABLE\st2\sAS\sVALUES(3);\r\nSELECT\s*\sFROM\s(\r\n\s\sSELECT\s*\sFROM\s(SELECT\s*\sFROM\st1\sLIMIT\s1)\r\n\s\sUNION\sALL\r\n\s\sSELECT\s*\sfrom\st2);\r\n</verbatim></blockquote>\r\n\r\n\r\nBisect\sshows\sthe\serror\swas\sintroduced\sby\scheck-in\s[67bfd59d9087a987f]\s(about\s5.3\syears\r\nago)\sand\sfirst\sappeared\sin\sSQLite\sversion\s3.8.4\s(2014-03-10).\r\n\r\nThis\sproblem\swas\sreported\son\sthe\smailing\slist\sby\sMarco\sFoit.
J login drh
J mimetype text/x-fossil-wiki
J severity Severe
J status Open
J title LIMIT\sapplied\sglobally\srather\sthan\slocally
J type Code_Defect
K c41afac34f15781fe09cd1475601db0186b0995b
U drh
Z c6be1568e331a61e8d5d81add60aa548