Thank you for checking the issue.
It seems I use an outdated version 3.11.0:

$ uname -a
Linux chrx 4.8.17-galliumos #1 SMP PREEMPT galliumos4 Thu Feb 23
02:27:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ sqlite3 --version
3.11.0 2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f

Regards,
Egor.

On Wed, Nov 1, 2017 at 11:30 AM, Egor Shalashnikov
<egor.shalashnikov...@gmail.com> wrote:
> Yes, absolutely correct
>
> On Nov 1, 2017 10:55 AM, "Clemens Ladisch" <clem...@ladisch.de> wrote:
>>
>> Egor Shalashnikov wrote:
>> > create table t(n number, v varchar2(10));
>> > insert into t values (1, 'one')
>> > explain select * from t where 0 < n;
>>
>> If you omit the EXPLAIN, is the code executed correctly?
>>
>> > addr  opcode         p1    p2    p3    p4             p5  comment
>> > ----  -------------  ----  ----  ----  -------------  --  -------------
>> > 13    Integer        0     2     0                    00  r[2]=0
>> > ...
>> > 2     Rewind         0     9     0                    00
>> > 3       Column         0     0     1                    00  r[1]=t.n
>> > 4       Le             2     8     1     (BINARY)       53  if
>> > r[2]<=r[1] goto 8
>> > 5       Copy           1     3     0                    00  r[3]=r[1]
>> > 6       Column         0     1     4                    00  r[4]=t.v
>> > 7       ResultRow      3     2     0                    00
>> > output=r[3..4]
>> > 8     Next           0     3     0                    01
>> > ...
>> > The line 4 seems wrong for me, because t.n(r[1]) should be <= than
>> > 0(r[2]) to be ignored (goto 8).
>>
>> The synopsis of OP_Le would be "if r[P3]<=r[P1] goto P2".
>>
>> There is indeed something wrong in your EXPLAIN output.  But my 3.21.0
>> correctly shows "r[1]<=r[2]".
>>
>>
>> Regards,
>> Clemens
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to