/ Check-in [46c4b792]
Login

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

Overview
Comment::-) (CVS 38)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 46c4b792e0a0e61c417f5c1771e013d90d652507
User & Date: drh 2000-06-02 14:27:23
Context
2000-06-02
14:38
:-) (CVS 39) check-in: 721d58f4 user: drh tags: trunk
14:27
:-) (CVS 38) check-in: 46c4b792 user: drh tags: trunk
13:27
:-) (CVS 37) check-in: 2b55f9b7 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    22     22   **
    23     23   *************************************************************************
    24     24   ** Main file for the SQLite library.  The routines in this file
    25     25   ** implement the programmer interface to the library.  Routines in
    26     26   ** other files are for internal use by SQLite and should not be
    27     27   ** accessed by users of the library.
    28     28   **
    29         -** $Id: main.c,v 1.6 2000/06/02 13:27:59 drh Exp $
           29  +** $Id: main.c,v 1.7 2000/06/02 14:27:23 drh Exp $
    30     30   */
    31     31   #include "sqliteInt.h"
    32     32   
    33     33   /*
    34     34   ** This is the callback routine for the code that initializes the
    35     35   ** database.  Each callback contains text of a CREATE TABLE or
    36     36   ** CREATE INDEX statement that must be parsed to yield the internal
................................................................................
   181    181   
   182    182     /* Attempt to read the schema */
   183    183     rc = sqliteInit(db, pzErrMsg);
   184    184     if( rc!=SQLITE_OK && rc!=SQLITE_BUSY ){
   185    185       sqlite_close(db);
   186    186       return 0;
   187    187     }else{
   188         -    sqliteFree(pzErrMsg);
          188  +    sqliteFree(*pzErrMsg);
   189    189       *pzErrMsg = 0;
   190    190     }
   191    191     return db;
   192    192   }
   193    193   
   194    194   /*
   195    195   ** Close an existing SQLite database

Changes to test/all.test.

    18     18   # Author contact information:
    19     19   #   drh@hwaci.com
    20     20   #   http://www.hwaci.com/drh/
    21     21   #
    22     22   #***********************************************************************
    23     23   # This file runs all tests.
    24     24   #
    25         -# $Id: all.test,v 1.1 2000/05/29 23:48:23 drh Exp $
           25  +# $Id: all.test,v 1.2 2000/06/02 14:27:23 drh Exp $
    26     26   
    27     27   set testdir [file dirname $argv0]
    28     28   source $testdir/tester.tcl
    29     29   rename finish_test really_finish_test
    30     30   proc finish_test {} {}
    31     31   
    32         -foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
    33         -  if {[file tail $testfile]=="all.test"} continue
    34         -  source $testfile
           32  +if {[file exists ./sqlite_test_count]} {
           33  +  set COUNT [exec cat ./sqlite_test_count]
           34  +} else {
           35  +  set COUNT 1
           36  +}
           37  +
           38  +for {set Counter 0} {$Counter<$COUNT} {incr Counter} {
           39  +  foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
           40  +    if {[file tail $testfile]=="all.test"} continue
           41  +    source $testfile
           42  +  }
    35     43   }
    36     44   
    37     45   really_finish_test

Changes to test/select2.test.

    19     19   #   drh@hwaci.com
    20     20   #   http://www.hwaci.com/drh/
    21     21   #
    22     22   #***********************************************************************
    23     23   # This file implements regression tests for SQLite library.  The
    24     24   # focus of this file is testing the SELECT statement.
    25     25   #
    26         -# $Id: select2.test,v 1.1 2000/06/02 13:28:16 drh Exp $
           26  +# $Id: select2.test,v 1.2 2000/06/02 14:27:23 drh Exp $
    27     27   
    28     28   set testdir [file dirname $argv0]
    29     29   source $testdir/tester.tcl
    30     30   
    31     31   execsql {CREATE TABLE tbl1(f1 int, f2 int)}
           32  +set f [open ./testdata1.txt w]
    32     33   for {set i 0} {$i<=30} {incr i} {
    33         -  execsql "INSERT INTO tbl1 VALUES([expr {$i%9}],[expr {$i%10}])"
           34  +  puts $f "[expr {$i%9}]\t[expr {$i%10}]\n"
    34     35   }
           36  +close $f
           37  +execsql {COPY tbl1 FROM './testdata1.txt'}
           38  +# file delete -force ./testdata1.txt
    35     39   
    36     40   # Do a second query inside a first.
    37     41   #
    38     42   do_test select2-1.1 {
    39     43     set sql {SELECT DISTINCT f1 FROM tbl1 ORDER BY f1}
    40     44     set r {}
    41     45     db eval $sql data {