/ Check-in [1d5ebb11]
Login

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

Overview
Comment:Test that it is ok to execute ALTER TABLE immediately after opening a database connection. (CVS 2281)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1d5ebb1146cc6e59d8b419b3fa4796552111606d
User & Date: danielk1977 2005-01-27 00:30:52
Context
2005-01-27
00:33
More changes to improve propagation of SQLITE_CORRUPT errors. (CVS 2282) check-in: e4b5c168 user: drh tags: trunk
00:30
Test that it is ok to execute ALTER TABLE immediately after opening a database connection. (CVS 2281) check-in: 1d5ebb11 user: danielk1977 tags: trunk
00:22
Have REINDEX handle missing collation sequences correctly. (CVS 2280) check-in: 1c1904f4 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/alter.test.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
487
488
489
490
491
492
493



494


495
496



















497
#    May you find forgiveness for yourself and forgive others.
#    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 ALTER TABLE statement.
#
# $Id: alter.test,v 1.8 2004/11/22 19:12:21 drh Exp $
#

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

# If SQLITE_OMIT_ALTERTABLE is defined, omit this file.
ifcapable !altertable {
................................................................................
  execsql {
    ALTER TABLE tbl1 RENAME TO tbl2;
    DELETE FROM tbl2;
    INSERT INTO tbl2 VALUES(NULL);
    SELECT a FROM tbl2;
  }
} {12}






} ;# ifcapable autoinc




















finish_test







|







 







>
>
>
|
>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
#    May you find forgiveness for yourself and forgive others.
#    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 ALTER TABLE statement.
#
# $Id: alter.test,v 1.9 2005/01/27 00:30:52 danielk1977 Exp $
#

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

# If SQLITE_OMIT_ALTERTABLE is defined, omit this file.
ifcapable !altertable {
................................................................................
  execsql {
    ALTER TABLE tbl1 RENAME TO tbl2;
    DELETE FROM tbl2;
    INSERT INTO tbl2 VALUES(NULL);
    SELECT a FROM tbl2;
  }
} {12}
do_test alter-4.4 {
  execsql {
    DROP TABLE tbl2;
  }
} {}

} ;# ifcapable autoinc

# Test that it is Ok to execute an ALTER TABLE immediately after
# opening a database.
do_test alter-5.1 {
  execsql {
    CREATE TABLE tbl1(a, b, c);
    INSERT INTO tbl1 VALUES('x', 'y', 'z');
  }
} {}
do_test alter-5.2 {
  sqlite3 db2 test.db
  execsql {
    ALTER TABLE tbl1 RENAME TO tbl2;
    SELECT * FROM tbl2;
  } db2
} {x y z}
do_test alter-5.3 {
  db2 close
} {}

finish_test