On 04/13/2013 11:22 PM, kenichi ishigaki wrote:
Hi.

I received a report that the result of the following SQL has changed
since 3.7.15.
I haven't looked into the sqlite source yet, but can we call this a bug?

No. No "ORDER BY" clause means that the results are delivered in
an undefined order. So both results are the same.

Suspect they are different as SQLite 3.7.15 and later figures out
that a full scan on the index on "title" might be quicker than a
full scan of the table b-tree (as the index is smaller on disk)
for the second query.

Dan.






Regards,

Kenichi Ishigaki

-----
create table cd (id integer primary key, title unique, year);
insert into cd (title, year) values ('foo', 2000);
insert into cd (title, year) values ('bar', 2001);
select * from cd;
select title from cd;
-----

(result prior 3.7.15)
-----
1|foo|2000
2|bar|2001
foo
bar
-----

(result 3.7.15 and newer)
-----
1|foo|2000
2|bar|2001
bar
foo
-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to