SQLite out of order error备忘

Talk is cheap, show me the code:

sqlite> create table t(id integer primary key);
sqlite> insert or ignore into dst values (10),(null),(13),(12);
sqlite> select * from t;
10
11
13
12
sqlite> pragma integrity_check;
*** in database main ***
On tree page 3 cell 3: Rowid 12 out of order (previous was 13)

 

有兴趣的朋友可以找几个版本的代码试试,看看能否复现这个问题。

官方的tcl测试还是要认真做的,有利于快速排除干扰信息,准确定位问题。

不直接给出解决办法,是为了脑子里始终能有个声音提醒自己不要忘了调试的过程。

 

备注:aHR0cCUzQS8vd3d3LmNuYmxvZ3MuY29tL3poaGQv

 

posted @ 2017-12-02 15:56  seebigsea  阅读(305)  评论(0编辑  收藏  举报