3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #*************************************************************************
13 source [file join [file dirname [info script]] fts5_common.tcl]
14 set testprefix fts5bigid
16 # If SQLITE_ENABLE_FTS5 is not defined, omit this file.
24 proc do_ascdesc_test {tn query} {
25 set ::lAsc [db eval { SELECT rowid FROM x1($query) }]
26 set ::lDesc [db eval { SELECT rowid FROM x1($query) ORDER BY rowid DESC }]
27 do_test $tn.1 { lsort -integer $::lAsc } $::lAsc
28 do_test $tn.2 { lsort -integer -decr $::lDesc } $::lDesc
29 do_test $tn.3 { lsort -integer $::lDesc } $::lAsc
33 CREATE VIRTUAL TABLE x1 USING fts5(a);
37 for {set ii 0} {$ii < $nRow} {incr ii} {
39 REPLACE INTO x1(rowid, a) VALUES(random(), 'movement at the station');
44 do_ascdesc_test 1.2 "the"
51 for {set ii 0} {$ii < $nRow} {incr ii} {
53 INSERT INTO x1(rowid, a) VALUES(
54 $ii + 0x6FFFFFFFFFFFFFFF, 'movement at the station'
60 do_ascdesc_test 1.5 "movement"