SQLite

Check-in [17122c7e8e]
Login

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

Overview
Comment:Final preparations for the 3.1.0 alpha release. (CVS 2255)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 17122c7e8e9cae36f1ffa7b42bd69d702980ac6a
User & Date: drh 2005-01-21 15:52:33.000
Context
2005-01-21
17:03
Update change log for version 3.1.0. (CVS 2256) (check-in: 4d9b858746 user: drh tags: trunk)
15:52
Final preparations for the 3.1.0 alpha release. (CVS 2255) (check-in: 17122c7e8e user: drh tags: trunk)
11:55
Improve test coverage for minimum feature builds. (CVS 2254) (check-in: 9c4d0e13e8 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to VERSION.
1
3.0.8
|
1
3.1.0alpha
Changes to test/attach.test.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
# $Id: attach.test,v 1.34 2005/01/21 11:55:27 danielk1977 Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

for {set i 2} {$i<=15} {incr i} {
  file delete -force test$i.db







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
# $Id: attach.test,v 1.35 2005/01/21 15:52:33 drh Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

for {set i 2} {$i<=15} {incr i} {
  file delete -force test$i.db
683
684
685
686
687
688
689

690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
# Check the error message if we try to access a database that has
# not been attached.
do_test attach-6.3 {
  catchsql {
    CREATE TABLE no_such_db.t1(a, b, c);
  }
} {1 {unknown database no_such_db}}

do_test attach-6.4 {
  catchsql {
    CREATE TEMP TABLE db2.temp1(a, b, c);
  }
} {1 {temporary table name must be unqualified}}

for {set i 2} {$i<=15} {incr i} {
  catch {db$i close}
}
db close
file delete -force test2.db
file delete -force no-such-file


finish_test







>
|
|
|
|
|
|









683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# Check the error message if we try to access a database that has
# not been attached.
do_test attach-6.3 {
  catchsql {
    CREATE TABLE no_such_db.t1(a, b, c);
  }
} {1 {unknown database no_such_db}}
ifcapable !compound {
  do_test attach-6.4 {
    catchsql {
      CREATE TEMP TABLE db2.temp1(a, b, c);
    }
  } {1 {temporary table name must be unqualified}}
}
for {set i 2} {$i<=15} {incr i} {
  catch {db$i close}
}
db close
file delete -force test2.db
file delete -force no-such-file


finish_test
Changes to test/join.test.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests for joins, including outer joins.
#
# $Id: join.test,v 1.17 2005/01/21 04:25:47 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

do_test join-1.1 {
  execsql {
    CREATE TABLE t1(a,b,c);







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests for joins, including outer joins.
#
# $Id: join.test,v 1.18 2005/01/21 15:52:33 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

do_test join-1.1 {
  execsql {
    CREATE TABLE t1(a,b,c);
410
411
412
413
414
415
416

417
418
419

420
421
422
423
424
425
426
    INSERT INTO t13 VALUES(22,222);
    COMMIT;
  }
} {}

ifcapable subquery {
  do_test join-9.1.1 {

    SELECT * FROM t12 NATURAL LEFT JOIN t13
      EXCEPT
      SELECT * FROM t12 NATURAL LEFT JOIN (SELECT * FROM t13 WHERE b>0);

  } {}
}
ifcapable view {
  do_test join-9.2 {
    execsql {
      CREATE VIEW v13 AS SELECT * FROM t13 WHERE b>0;
      SELECT * FROM t12 NATURAL LEFT JOIN t13







>
|


>







410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
    INSERT INTO t13 VALUES(22,222);
    COMMIT;
  }
} {}

ifcapable subquery {
  do_test join-9.1.1 {
    execsql {
      SELECT * FROM t12 NATURAL LEFT JOIN t13
      EXCEPT
      SELECT * FROM t12 NATURAL LEFT JOIN (SELECT * FROM t13 WHERE b>0);
    }
  } {}
}
ifcapable view {
  do_test join-9.2 {
    execsql {
      CREATE VIEW v13 AS SELECT * FROM t13 WHERE b>0;
      SELECT * FROM t12 NATURAL LEFT JOIN t13
Changes to test/trigger2.test.
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
  DROP TABLE log;
}

# trigger2-3.2: WHEN clause
set when_triggers [list {t1 BEFORE INSERT ON tbl WHEN new.a > 20}]
ifcapable subquery {
  lappend when_triggers \
      {t2 BEFORE INSERT ON tbl WHEN (SELECT count(*) FROM tbl) = 0} ]
}

execsql {
  CREATE TABLE tbl (a, b, c, d);
  CREATE TABLE log (a);
  INSERT INTO log VALUES (0);
}







|







349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
  DROP TABLE log;
}

# trigger2-3.2: WHEN clause
set when_triggers [list {t1 BEFORE INSERT ON tbl WHEN new.a > 20}]
ifcapable subquery {
  lappend when_triggers \
      {t2 BEFORE INSERT ON tbl WHEN (SELECT count(*) FROM tbl) = 0}
}

execsql {
  CREATE TABLE tbl (a, b, c, d);
  CREATE TABLE log (a);
  INSERT INTO log VALUES (0);
}
Changes to tool/mkkeywordhash.c.
1
2
3
4
5
6
7
8
9







10
11
12
13
14
15
16
/*
** Compile and run this standalone program in order to generate code that
** implements a function that will translate alphabetic identifiers into
** parser token codes.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>








/*
** All the keywords of the SQL language are stored as in a hash
** table composed of instances of the following structure.
*/
typedef struct Keyword Keyword;
struct Keyword {
  char *zName;         /* The keyword name */









>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
** Compile and run this standalone program in order to generate code that
** implements a function that will translate alphabetic identifiers into
** parser token codes.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

/*
** Cursor support is off by default.
*/
#if !defined(SQLITE_ENABLE_CURSOR) && !defined(SQLITE_OMIT_CURSOR)
# define SQLITE_OMIT_CURSOR 1
#endif

/*
** All the keywords of the SQL language are stored as in a hash
** table composed of instances of the following structure.
*/
typedef struct Keyword Keyword;
struct Keyword {
  char *zName;         /* The keyword name */