/ Check-in [99d8e325]
Login

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

Overview
Comment:Additional automatic index tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 99d8e325e9eb8905631b06676206e6412f386d08
User & Date: drh 2010-04-08 16:30:39
Context
2010-04-08
17:28
Fix code coverage problems in where.c. check-in: b04a5282 user: drh tags: trunk
16:30
Additional automatic index tests. check-in: 99d8e325 user: drh tags: trunk
15:01
New test cases for automatic indices. New testcase() macros associated with column-used bitmasks. check-in: e1aa48ac user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/autoindex1.test.

    98     98       db eval {UPDATE t2 SET d=d+1}
    99     99     }
   100    100     set r
   101    101   } {11 911 22 922 33 933 44 944 55 955 66 966 77 977 88 988}
   102    102   do_test autoindex1-310 {
   103    103     db eval {SELECT d FROM t2 ORDER BY d}
   104    104   } {919 930 941 952 963 974 985 996}
          105  +
          106  +# The next test does a 10-way join on unindexed tables.  Without
          107  +# automatic indices, the join will take a long time to complete.
          108  +# With automatic indices, it should only take about a second.
          109  +#
          110  +do_test autoindex1-400 {
          111  +  db eval {
          112  +    CREATE TABLE t4(a, b);
          113  +    INSERT INTO t4 VALUES(1,2);
          114  +    INSERT INTO t4 VALUES(2,3);
          115  +  }
          116  +  for {set n 2} {$n<4096} {set n [expr {$n+$n}]} {
          117  +    db eval {INSERT INTO t4 SELECT a+$n, b+$n FROM t4}
          118  +  }
          119  +  db eval {
          120  +    SELECT count(*) FROM t4;
          121  +  }
          122  +} {4096}
          123  +do_test autoindex1-401 {
          124  +  db eval {
          125  +    SELECT count(*)
          126  +      FROM t4 AS x1
          127  +      JOIN t4 AS x2 ON x2.a=x1.b
          128  +      JOIN t4 AS x3 ON x3.a=x2.b
          129  +      JOIN t4 AS x4 ON x4.a=x3.b
          130  +      JOIN t4 AS x5 ON x5.a=x4.b
          131  +      JOIN t4 AS x6 ON x6.a=x5.b
          132  +      JOIN t4 AS x7 ON x7.a=x6.b
          133  +      JOIN t4 AS x8 ON x8.a=x7.b
          134  +      JOIN t4 AS x9 ON x9.a=x8.b
          135  +      JOIN t4 AS x10 ON x10.a=x9.b;
          136  +  }
          137  +} {4087}
   105    138   
   106    139   finish_test