/ Check-in [25f49acc]
Login

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

Overview
Comment:Test coverage improvements. (CVS 3807)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 25f49acc5662ed8dd321b83a60aeeab93a37e129
User & Date: drh 2007-04-04 01:27:44
Context
2007-04-05
05:46
Zero cached pages located beyond the end of the file before returning them. Ticket #2285. (CVS 3808) check-in: 5180810e user: danielk1977 tags: trunk
2007-04-04
01:27
Test coverage improvements. (CVS 3807) check-in: 25f49acc user: drh tags: trunk
2007-04-03
16:13
Add Tcl (flush) commands to exclusive2.test, which is failing on some systems but not others. (CVS 3806) check-in: 9e004c51 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

  1658   1658   int sqlite3VdbeCursorMoveto(Cursor *p){
  1659   1659     if( p->deferredMoveto ){
  1660   1660       int res, rc;
  1661   1661   #ifdef SQLITE_TEST
  1662   1662       extern int sqlite3_search_count;
  1663   1663   #endif
  1664   1664       assert( p->isTable );
  1665         -    if( p->isTable ){
  1666         -      rc = sqlite3BtreeMoveto(p->pCursor, 0, p->movetoTarget, 0, &res);
  1667         -    }else{
  1668         -      rc = sqlite3BtreeMoveto(p->pCursor,(char*)&p->movetoTarget,
  1669         -                              sizeof(i64), 0, &res);
  1670         -    }
         1665  +    rc = sqlite3BtreeMoveto(p->pCursor, 0, p->movetoTarget, 0, &res);
  1671   1666       if( rc ) return rc;
  1672   1667       *p->pIncrKey = 0;
  1673   1668       p->lastRowid = keyToInt(p->movetoTarget);
  1674   1669       p->rowidIsValid = res==0;
  1675   1670       if( res<0 ){
  1676   1671         rc = sqlite3BtreeNext(p->pCursor, &res);
  1677   1672         if( rc ) return rc;
................................................................................
  1756   1751       return 7;
  1757   1752     }
  1758   1753     if( flags&MEM_Str ){
  1759   1754       int n = pMem->n;
  1760   1755       assert( n>=0 );
  1761   1756       return ((n*2) + 13);
  1762   1757     }
  1763         -  if( flags&MEM_Blob ){
  1764         -    return (pMem->n*2 + 12);
  1765         -  }
  1766         -  return 0;
         1758  +  assert( (flags & MEM_Blob)!=0 );
         1759  +  return (pMem->n*2 + 12);
  1767   1760   }
  1768   1761   
  1769   1762   /*
  1770   1763   ** Return the length of the data corresponding to the supplied serial-type.
  1771   1764   */
  1772   1765   int sqlite3VdbeSerialTypeLen(u32 serial_type){
  1773   1766     if( serial_type>=12 ){

Changes to test/bindxfer.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script testing the sqlite_transfer_bindings() API.
    13     13   #
    14         -# $Id: bindxfer.test,v 1.2 2006/01/03 00:33:50 drh Exp $
           14  +# $Id: bindxfer.test,v 1.3 2007/04/04 01:27:44 drh Exp $
    15     15   #
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   proc sqlite_step {stmt VALS COLS} {
    21     21     upvar #0 $VALS vals
................................................................................
    63     63   } {{} {} {}}
    64     64   do_test bindxfer-1.7 {
    65     65     sqlite_step $VM2 VALUES COLNAMES
    66     66   } SQLITE_ROW
    67     67   do_test bindxfer-1.8 {
    68     68     set VALUES
    69     69   } {one two {}}
    70         -catch {sqlite3_finalize $VM1}
    71         -catch {sqlite3_finalize $VM2}
           70  +do_test bindxfer-1.9 {
           71  +  catch {sqlite3_finalize $VM1}
           72  +  catch {sqlite3_finalize $VM2}
           73  +  sqlite3_transfer_bindings $VM1 $VM2
           74  +} 21 ;# SQLITE_MISUSE
           75  +do_test bindxfer-1.10 {
           76  +  set VM1 [sqlite3_prepare $DB {SELECT ?, ?, ?} -1 TAIL]
           77  +  set VM2 [sqlite3_prepare $DB {SELECT ?, ?, ?, ?} -1 TAIL]
           78  +  sqlite3_transfer_bindings $VM1 $VM2
           79  +} 1  ;# SQLITE_ERROR
           80  +
    72     81   
    73     82   finish_test

Changes to test/btree.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is btree database backend
    13     13   #
    14         -# $Id: btree.test,v 1.38 2007/01/03 23:37:29 drh Exp $
           14  +# $Id: btree.test,v 1.39 2007/04/04 01:27:44 drh Exp $
    15     15   
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   ifcapable default_autovacuum {
    21     21     finish_test
................................................................................
    90     90   # Reopen the database and attempt to read the record that we wrote.
    91     91   #
    92     92   do_test btree-2.1 {
    93     93     set rc [catch {btree_cursor $::b1 1 1} ::c1]
    94     94     if {$rc} {lappend rc $::c1}
    95     95     set rc
    96     96   } {0}
           97  +do_test btree-2.1.1 {
           98  +  btree_cursor_list $::b1
           99  +} {}
    97    100   do_test btree-2.2 {
    98    101     btree_move_to $::c1 99
    99    102   } {1}
   100    103   do_test btree-2.3 {
   101    104     btree_move_to $::c1 101
   102    105   } {-1}
   103    106   do_test btree-2.4 {

Changes to test/shared.test.

     5      5   #
     6      6   #    May you do good and not evil.
     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12         -# $Id: shared.test,v 1.21 2006/01/23 21:38:03 drh Exp $
           12  +# $Id: shared.test,v 1.22 2007/04/04 01:27:44 drh Exp $
    13     13   
    14     14   set testdir [file dirname $argv0]
    15     15   source $testdir/tester.tcl
    16     16   db close
    17     17   
    18     18   ifcapable !shared_cache {
    19     19     finish_test
................................................................................
   844    844       execsql {
   845    845         DELETE FROM abc WHERE 1;
   846    846       }
   847    847       lappend res $I $II
   848    848     }
   849    849     set res
   850    850   } {1 4 {} 7}
          851  +do_test shared-$av.11.9 {
          852  +  sqlite_shared_cache_report 
          853  +} [list [file normalize test.db] 2]
   851    854   
   852    855   do_test shared-$av.11.11 {
   853    856     db close
   854    857     db2 close
   855    858   } {}
   856    859   
   857    860   }
   858    861   
   859    862   sqlite3_enable_shared_cache $::enable_shared_cache
   860    863   finish_test