/ Check-in [e1aa48ac]
Login

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

Overview
Comment:New test cases for automatic indices. New testcase() macros associated with column-used bitmasks.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e1aa48ace7e43c3805278120b8228ee597e2cee7
User & Date: drh 2010-04-08 15:01:45
Context
2010-04-08
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
15:01
Fix the computation of the number of rows in a table during automatic index generation. check-in: edeab06a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/resolve.c.

   411    411       struct SrcList_item *pItem = &pSrc->a[iSrc];
   412    412       p->pTab = pItem->pTab;
   413    413       p->iTable = pItem->iCursor;
   414    414       if( p->pTab->iPKey==iCol ){
   415    415         p->iColumn = -1;
   416    416       }else{
   417    417         p->iColumn = (ynVar)iCol;
          418  +      testcase( iCol==BMS );
          419  +      testcase( iCol==BMS-1 );
   418    420         pItem->colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);
   419    421       }
   420    422       ExprSetProperty(p, EP_Resolved);
   421    423     }
   422    424     return p;
   423    425   }
   424    426   

Changes to test/autoindex1.test.

    85     85     db status step
    86     86   } {7}
    87     87   do_test autoindex1-212 {
    88     88     db status autoindex
    89     89   } {7}
    90     90   
    91     91   
           92  +# Modify the second table of the join while the join is in progress
           93  +#
           94  +do_test autoindex1-300 {
           95  +  set r {}
           96  +  db eval {SELECT b, d FROM t1 JOIN t2 ON (c=a)} {
           97  +    lappend r $b $d
           98  +    db eval {UPDATE t2 SET d=d+1}
           99  +  }
          100  +  set r
          101  +} {11 911 22 922 33 933 44 944 55 955 66 966 77 977 88 988}
          102  +do_test autoindex1-310 {
          103  +  db eval {SELECT d FROM t2 ORDER BY d}
          104  +} {919 930 941 952 963 974 985 996}
    92    105   
    93    106   finish_test