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
\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
\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