On 05/16/2018 06:20 PM, Sathish Kumar wrote:
Hi,
Sorry, Please find the full sequence below, it is taken from S9 device
running with Android 8.0.
This is a bit strange. The VM code looks correct. Try running a [make
clean] to ensure you're getting a clean build.
If that doesn't work, please try building with SQLITE_DEBUG defined and
post the results of running the script below. It's working on Android 7
here.
Dan.
####################################################
create table test (id integer primary key autoincrement, name text);
insert into test (name) values('a');
insert into test (name) values('a');
insert into test (name) values('a');
insert into test (name) values('a');
insert into test (name) values('a');
insert into test (name) values('a');
insert into test (name) values('a');
.print "--- select count(*) from test;"
select count(*) from test;
.print "--- select * from test;"
select * from test;
.print "--- select * from test limit 10 offset 2;"
select * from test limit 10 offset 2;
.print "--- select * from test limit 10 offset 5;"
select * from test limit 10 offset 5;
.print "--- select * from test limit 2 offset 3;"
select * from test limit 2 offset 3;
.print "--- EXPLAIN SELECT * FROM test LIMIT 2 OFFSET 5;"
EXPLAIN SELECT * FROM test LIMIT 2 OFFSET 5;
.print "--- SELECT * FROM test LIMIT 2 OFFSET 5;"
SELECT * FROM test LIMIT 2 OFFSET 5;
.print "--- with vdbe_trace"
PRAGMA vdbe_trace = 1;
SELECT * FROM test LIMIT 2 OFFSET 5;
####################################################
sqlite> create table test (id integer primary key autoincrement, name
text);
sqlite> insert into test (name) values('a');
sqlite> insert into test (name) values('a');
sqlite> insert into test (name) values('a');
sqlite> insert into test (name) values('a');
sqlite> insert into test (name) values('a');
sqlite> insert into test (name) values('a');
sqlite> insert into test (name) values('a');
sqlite> select count(*) from test;
7
sqlite> select * from test limit 10 offset 2;
2|a
3|a
4|a
5|a
6|a
7|a
sqlite> select * from test limit 10 offset 5;
2|a
3|a
4|a
5|a
6|a
7|a
sqlite> select * from test limit 2 offset 3;
2|a
3|a
sqlite> select * from test limit 2 offset 5;
2|a
3|a
sqlite> select * from test limit 2,5;
2|a
3|a
4|a
5|a
6|a
sqlite> select * from test limit 5,2;
2|a
3|a
sqlite> select * from test limit 5,3;
2|a
3|a
4|a
sqlite> select * from test;
1|a
2|a
3|a
4|a
5|a
6|a
7|a
sqlite> EXPLAIN SELECT * FROM test LIMIT 2 OFFSET 5;
addr opcode p1 p2 p3 p4 p5 comment
---- ------------- ---- ---- ---- ------------- -- -------------
0 Init 0 14 0 00
1 Integer 2 1 0 00
2 Integer 5 2 0 00
3 MustBeInt 2 0 0 00
4 OffsetLimit 1 3 2 00
5 OpenRead 0 383 0 2 00
6 Rewind 0 13 0 00
7 IfPos 2 12 1 00
8 Rowid 0 4 0 00
9 Column 0 1 5 00
10 ResultRow 4 2 0 00
11 DecrJumpZero 1 13 0 00
12 Next 0 7 0 01
13 Halt 0 0 0 00
14 Transaction 0 0 44 0 01
15 Goto 0 1 0 00
sqlite> .schema test
CREATE TABLE test (id integer primary key autoincrement, name text);
sqlite> PRAGMA table_info(test);
0|id|integer|0||1
1|name|text|0||0
Thanks,
Sathish
On Wed, May 16, 2018 at 4:19 PM, Richard Hipp <[email protected]> wrote:
On 5/16/18, Sathish Kumar <[email protected]> wrote:
I just skipped those statements in mail, but i inserted 7 rows.
Please send *exactly* the sequence of commands that you think are
producing an incorrect answer. Please leave nothing to chance, or to
interpretation.
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users