TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

SQLite: Infinite loop due to the ‘order by limit’ optimization

144 点作者 ScottWRobinson超过 6 年前

10 条评论

hyperman1超过 6 年前
I think most of us agree that SQLite is close to the gold standard for stability and testing. This post reminds us that even SQLite has critical bugs.<p>But looking at <a href="https:&#x2F;&#x2F;www.sqlite.org&#x2F;cgi&#x2F;src&#x2F;rptview?rn=7" rel="nofollow">https:&#x2F;&#x2F;www.sqlite.org&#x2F;cgi&#x2F;src&#x2F;rptview?rn=7</a> I see a few Core Crash Bugs every month (April has 7). Most of them are not &#x27;critical&#x27;, to be clear, plenty of &#x27;severe&#x27; and &#x27;important&#x27; in the list.<p>I don&#x27;t want to disparage SQLite. They have a free, fantastic product, go to great lengths to have stability no matter what, and document their processes. I learned a lot of them.<p>But clearly, our gold standard is not perfect. So now what?<p>* We might turn to theorem proving. But is it possible at SQLite scale? Are the proofs themselves enough? I remember about a critical piece of software with a proof no incorrect answers would come out. Turns out they forgot to prove the program would end, so they got no answer ever instead of an incorrect one. How do you prove your proofs are complete enough?<p>* We might turn to fuzzing, code analyses, linting,... SQLite does all of them.<p>* Or simply admit we are human, fallible, and try to do the best we can while knowing our limits? Sounds defeatist.
评论 #17966835 未加载
评论 #17971112 未加载
评论 #17966575 未加载
评论 #17968405 未加载
评论 #17966878 未加载
评论 #17966469 未加载
评论 #17966708 未加载
评论 #17977268 未加载
评论 #17966468 未加载
评论 #17966360 未加载
nathancahill超过 6 年前
For the curious, this was the resolution: <a href="http:&#x2F;&#x2F;www.sqlite.org&#x2F;cgi&#x2F;src&#x2F;info&#x2F;206720129ed2fa88" rel="nofollow">http:&#x2F;&#x2F;www.sqlite.org&#x2F;cgi&#x2F;src&#x2F;info&#x2F;206720129ed2fa88</a>
danso超过 6 年前
&gt; <i>This problem was originally reported on the SQLite users mailing list. It took considerable effort to reproduce the problem and then boil it down to the repro script shown above.</i><p>The resulting script for reproducing the bug is indeed concise, but I almost want to read about the starting point, and how much of a struggle it was to investigate and deduce the factors behind this bug.
lixtra超过 6 年前
I find the infinite loop much less troublesome than the wrong data that apparently this bug may cause as well.
exikyut超过 6 年前
ARG. The sqlite mailing list manager sent me my plaintext password back in its &quot;welcome&quot; email.<p>D&#x27;:
评论 #17965559 未加载
评论 #17968306 未加载
评论 #17966052 未加载
评论 #17964863 未加载
pornel超过 6 年前
I guess the test suite doesn&#x27;t check for the halting problem yet.<p>(but seriously, it&#x27;s great when a project is so stable that having a bug is newsworthy).
spdegabrielle超过 6 年前
I wonder if a a usable subset of SQLite&#x2F;sql92 would be amiable to to formal methods, or if that is still to big?
评论 #17967044 未加载
yread超过 6 年前
Is it going to end up in 3.25?
nathancahill超过 6 年前
Better title: &quot;SQLite: Infinite loop due to the ORDER BY LIMIT optimization&quot;
评论 #17964976 未加载
yoklov超过 6 年前
This probably needs a rename, &quot;SQLite: View Ticket&quot; is not a terribly descriptive title.<p>That said, it&#x27;s a little surprising to see a bug of this type in SQLite which generally has such solid test coverage... Oh well, nothing is bug free after all.
评论 #17964647 未加载
评论 #17964730 未加载
评论 #17964709 未加载