<div dir="ltr">I woudln't consider it as an actual 'fix' though.</div><br><div class="gmail_quote"><div dir="ltr">ср, 18 июл. 2018 г. в 18:17, <a href="mailto:n.pettik@corp.mail.ru">n.pettik@corp.mail.ru</a> <<a href="mailto:n.pettik@corp.mail.ru">n.pettik@corp.mail.ru</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote"><div>I tried to test that problem on this sqlite3 version with -DSQLITE_DEBUG and assertion fails there. </div><div>Since flattening only makes another compound select-stmt with ORDER BY clause I guess error was</div><div>occuring on flattened version of it. Moreover in latter versions of sqlite3 this assert was deleted and the</div><div>restriction check wasn't fixed. So I assume sqlite3 developers just don't know about it or don't aim on</div><div>fixing it as the error anyways occurs but on flattened subquery.</div></div></div></div></blockquote><div><br></div><div>Here is original fix of this assertion fail (JFYI):</div><div><a href="https://www.sqlite.org/src/info/823779d31eb09cda" target="_blank">https://www.sqlite.org/src/info/823779d31eb09cda</a></div><div><br></div></div></div></blockquote></div>