SQLite

Check-in [f87bb28361]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Changes to stat.test so that it works with file-format 4.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f87bb283615847764d24943695990564f02b939e
User & Date: dan 2010-07-19 12:05:33.000
Context
2010-07-19
12:44
Use exit(255) instead of abort() in the tcl [sqlite_abort] test command. This stops testfixture from creating dozens of core files each time tests are run. (check-in: aec9e13148 user: dan tags: trunk)
12:05
Changes to stat.test so that it works with file-format 4. (check-in: f87bb28361 user: dan tags: trunk)
11:16
Re-introduce the prefix-search optimization of [feef1b15d6], which was lost in a reorganization of FTS3 code. (check-in: d692434b49 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/stat.test.
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  SELECT * FROM stat;
} {wal delete sqlite_master / 1 leaf 0 0 916 0}

do_test stat-1.0 {
  execsql {
    CREATE TABLE t1(a, b);
    CREATE INDEX i1 ON t1(b);
    INSERT INTO t1 VALUES(1, 2);
    INSERT INTO t1 VALUES(3, 4);
  }
} {}
do_test stat-1.1 {
  execsql {
    SELECT * FROM stat WHERE name = 't1';
  }
} {t1 / 2 leaf 2 10 998 5}







|
|







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  SELECT * FROM stat;
} {wal delete sqlite_master / 1 leaf 0 0 916 0}

do_test stat-1.0 {
  execsql {
    CREATE TABLE t1(a, b);
    CREATE INDEX i1 ON t1(b);
    INSERT INTO t1(rowid, a, b) VALUES(2, 2, 3);
    INSERT INTO t1(rowid, a, b) VALUES(3, 4, 5);
  }
} {}
do_test stat-1.1 {
  execsql {
    SELECT * FROM stat WHERE name = 't1';
  }
} {t1 / 2 leaf 2 10 998 5}
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
  execsql {
    DROP TABLE t1;
  }
} {}

do_execsql_test stat-2.1 {
  CREATE TABLE t3(a PRIMARY KEY, b);
  INSERT INTO t3 VALUES(a_string(111), a_string(222));
  INSERT INTO t3 SELECT a_string(111+rowid), a_string(222+rowid) FROM t3;
  INSERT INTO t3 SELECT a_string(111+rowid), a_string(222+rowid) FROM t3;
  INSERT INTO t3 SELECT a_string(111+rowid), a_string(222+rowid) FROM t3;
  INSERT INTO t3 SELECT a_string(111+rowid), a_string(222+rowid) FROM t3;
  INSERT INTO t3 SELECT a_string(111+rowid), a_string(222+rowid) FROM t3;
  SELECT * FROM stat WHERE name != 'sqlite_master';
} [list \
  sqlite_autoindex_t3_1 / 3 internal 3 368 623 125       \
  sqlite_autoindex_t3_1 /000/ 8 leaf 8 946 46 123        \
  sqlite_autoindex_t3_1 /001/ 9 leaf 8 988 2 131         \
  sqlite_autoindex_t3_1 /002/ 15 leaf 7 857 137 132      \
  sqlite_autoindex_t3_1 /003/ 20 leaf 6 739 257 129      \







|
|
|
|
|
|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
  execsql {
    DROP TABLE t1;
  }
} {}

do_execsql_test stat-2.1 {
  CREATE TABLE t3(a PRIMARY KEY, b);
  INSERT INTO t3(rowid, a, b) VALUES(2, a_string(111), a_string(222));
  INSERT INTO t3 SELECT a_string(110+rowid), a_string(221+rowid) FROM t3;
  INSERT INTO t3 SELECT a_string(110+rowid), a_string(221+rowid) FROM t3;
  INSERT INTO t3 SELECT a_string(110+rowid), a_string(221+rowid) FROM t3;
  INSERT INTO t3 SELECT a_string(110+rowid), a_string(221+rowid) FROM t3;
  INSERT INTO t3 SELECT a_string(110+rowid), a_string(221+rowid) FROM t3;
  SELECT * FROM stat WHERE name != 'sqlite_master';
} [list \
  sqlite_autoindex_t3_1 / 3 internal 3 368 623 125       \
  sqlite_autoindex_t3_1 /000/ 8 leaf 8 946 46 123        \
  sqlite_autoindex_t3_1 /001/ 9 leaf 8 988 2 131         \
  sqlite_autoindex_t3_1 /002/ 15 leaf 7 857 137 132      \
  sqlite_autoindex_t3_1 /003/ 20 leaf 6 739 257 129      \
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
  t3 /00f/ 23 leaf 2 738 268 370                         \
]
do_execsql_test stat-2.2 { DROP TABLE t3 } {}

do_execsql_test stat-3.1 {
  CREATE TABLE t4(x);
  CREATE INDEX i4 ON t4(x);
  INSERT INTO t4 VALUES(a_string(7777));
  SELECT * FROM stat WHERE name != 'sqlite_master';
} [list \
  i4 / 3 leaf 1 103 905 7782                 \
  i4 /000+000000 9 overflow 0 1020 0 0       \
  i4 /000+000001 10 overflow 0 1020 0 0      \
  i4 /000+000002 11 overflow 0 1020 0 0      \
  i4 /000+000003 12 overflow 0 1020 0 0      \







|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
  t3 /00f/ 23 leaf 2 738 268 370                         \
]
do_execsql_test stat-2.2 { DROP TABLE t3 } {}

do_execsql_test stat-3.1 {
  CREATE TABLE t4(x);
  CREATE INDEX i4 ON t4(x);
  INSERT INTO t4(rowid, x) VALUES(2, a_string(7777));
  SELECT * FROM stat WHERE name != 'sqlite_master';
} [list \
  i4 / 3 leaf 1 103 905 7782                 \
  i4 /000+000000 9 overflow 0 1020 0 0       \
  i4 /000+000001 10 overflow 0 1020 0 0      \
  i4 /000+000002 11 overflow 0 1020 0 0      \
  i4 /000+000003 12 overflow 0 1020 0 0      \