SQLite

Check-in [0ce1efa460]
Login

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

Overview
Comment:Fix a problem in the fkey_malloc.test script.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0ce1efa46080f379089b03706daeac96c4add0f9
User & Date: dan 2009-09-23 17:31:19.000
Context
2009-09-23
18:07
Fix a problem with FK constraints that implicitly map to a composite primary key. (check-in: e0a48d5311 user: dan tags: trunk)
17:31
Fix a problem in the fkey_malloc.test script. (check-in: 0ce1efa460 user: dan tags: trunk)
17:30
Do not check immediate foreign key constraints until the end of the statement. This matches the postgres behaviour. (check-in: 1a32149cc3 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/fkey_malloc.test.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
    UPDATE t2 SET x = 'c';
  COMMIT;
}

do_malloc_test fkey_malloc-3 -sqlprep {
  PRAGMA foreign_keys = 1;
  CREATE TABLE t1(x INTEGER PRIMARY KEY);
  CREATE TABLE t2(y REFERENCES t1(rowid) ON UPDATE CASCADE);
  CREATE TABLE t3(y DEFAULT 14 REFERENCES t1(x) ON UPDATE SET DEFAULT);
  CREATE TABLE t4(y REFERENCES t1 ON UPDATE SET NULL);
  INSERT INTO t1 VALUES(13);
  INSERT INTO t2 VALUES(13);
  INSERT INTO t3 VALUES(13);
  INSERT INTO t4 VALUES(13);
} -sqlbody {
  UPDATE t1 SET x = 14;
}

proc catch_fk_error {zSql} {
  set rc [catch {db eval $zSql} msg]
  if {$rc==0} {







<
|
|



<







47
48
49
50
51
52
53

54
55
56
57
58

59
60
61
62
63
64
65
    UPDATE t2 SET x = 'c';
  COMMIT;
}

do_malloc_test fkey_malloc-3 -sqlprep {
  PRAGMA foreign_keys = 1;
  CREATE TABLE t1(x INTEGER PRIMARY KEY);

  CREATE TABLE t2(y DEFAULT 14 REFERENCES t1(x) ON UPDATE SET DEFAULT);
  CREATE TABLE t3(y REFERENCES t1 ON UPDATE SET NULL);
  INSERT INTO t1 VALUES(13);
  INSERT INTO t2 VALUES(13);
  INSERT INTO t3 VALUES(13);

} -sqlbody {
  UPDATE t1 SET x = 14;
}

proc catch_fk_error {zSql} {
  set rc [catch {db eval $zSql} msg]
  if {$rc==0} {