Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: third_party/sqlite/src/test/fkey1.test

Issue 5626002: Update sqlite to 3.7.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/third_party/sqlite/src
Patch Set: Remove misc change. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/filefmt.test ('k') | third_party/sqlite/src/test/fkey2.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2001 September 15 1 # 2001 September 15
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 28 matching lines...) Expand all
39 execsql { 39 execsql {
40 CREATE TABLE t2( 40 CREATE TABLE t2(
41 x INTEGER PRIMARY KEY, 41 x INTEGER PRIMARY KEY,
42 y TEXT 42 y TEXT
43 ); 43 );
44 } 44 }
45 } {} 45 } {}
46 do_test fkey1-1.2 { 46 do_test fkey1-1.2 {
47 execsql { 47 execsql {
48 CREATE TABLE t3( 48 CREATE TABLE t3(
49 a INTEGER REFERENCES t2 ON INSERT RESTRICT, 49 a INTEGER REFERENCES t2,
50 b INTEGER REFERENCES t1, 50 b INTEGER REFERENCES t1,
51 FOREIGN KEY (a,b) REFERENCES t2(x,y) 51 FOREIGN KEY (a,b) REFERENCES t2(x,y)
52 ); 52 );
53 } 53 }
54 } {} 54 } {}
55 55
56 do_test fkey1-2.1 { 56 do_test fkey1-2.1 {
57 execsql { 57 execsql {
58 CREATE TABLE t4(a integer primary key); 58 CREATE TABLE t4(a integer primary key);
59 CREATE TABLE t5(x references t4); 59 CREATE TABLE t5(x references t4);
(...skipping 13 matching lines...) Expand all
73 73
74 do_test fkey1-3.1 { 74 do_test fkey1-3.1 {
75 execsql { 75 execsql {
76 CREATE TABLE t5(a PRIMARY KEY, b, c); 76 CREATE TABLE t5(a PRIMARY KEY, b, c);
77 CREATE TABLE t6( 77 CREATE TABLE t6(
78 d REFERENCES t5, 78 d REFERENCES t5,
79 e REFERENCES t5(c) 79 e REFERENCES t5(c)
80 ); 80 );
81 PRAGMA foreign_key_list(t6); 81 PRAGMA foreign_key_list(t6);
82 } 82 }
83 } [concat \ 83 } [concat \
84 {0 0 t5 e c RESTRICT RESTRICT NONE} \ 84 {0 0 t5 e c {NO ACTION} {NO ACTION} NONE} \
85 {1 0 t5 d {} RESTRICT RESTRICT NONE} \ 85 {1 0 t5 d {} {NO ACTION} {NO ACTION} NONE} \
86 ] 86 ]
87 do_test fkey1-3.2 { 87 do_test fkey1-3.2 {
88 execsql { 88 execsql {
89 CREATE TABLE t7(d, e, f, 89 CREATE TABLE t7(d, e, f,
90 FOREIGN KEY (d, e) REFERENCES t5(a, b) 90 FOREIGN KEY (d, e) REFERENCES t5(a, b)
91 ); 91 );
92 PRAGMA foreign_key_list(t7); 92 PRAGMA foreign_key_list(t7);
93 } 93 }
94 } [concat \ 94 } [concat \
95 {0 0 t5 d a RESTRICT RESTRICT NONE} \ 95 {0 0 t5 d a {NO ACTION} {NO ACTION} NONE} \
96 {0 1 t5 e b RESTRICT RESTRICT NONE} \ 96 {0 1 t5 e b {NO ACTION} {NO ACTION} NONE} \
97 ] 97 ]
98 do_test fkey1-3.3 { 98 do_test fkey1-3.3 {
99 execsql { 99 execsql {
100 CREATE TABLE t8(d, e, f, 100 CREATE TABLE t8(d, e, f,
101 FOREIGN KEY (d, e) REFERENCES t5 ON DELETE CASCADE ON UPDATE SET NULL 101 FOREIGN KEY (d, e) REFERENCES t5 ON DELETE CASCADE ON UPDATE SET NULL
102 ); 102 );
103 PRAGMA foreign_key_list(t8); 103 PRAGMA foreign_key_list(t8);
104 } 104 }
105 } [concat \ 105 } [concat \
106 {0 0 t5 d {} {SET NULL} CASCADE NONE} \ 106 {0 0 t5 d {} {SET NULL} CASCADE NONE} \
107 {0 1 t5 e {} {SET NULL} CASCADE NONE} \ 107 {0 1 t5 e {} {SET NULL} CASCADE NONE} \
108 ] 108 ]
109 do_test fkey1-3.4 { 109 do_test fkey1-3.4 {
110 execsql { 110 execsql {
111 CREATE TABLE t9(d, e, f, 111 CREATE TABLE t9(d, e, f,
112 FOREIGN KEY (d, e) REFERENCES t5 ON DELETE CASCADE ON UPDATE SET DEFAULT 112 FOREIGN KEY (d, e) REFERENCES t5 ON DELETE CASCADE ON UPDATE SET DEFAULT
113 ); 113 );
114 PRAGMA foreign_key_list(t9); 114 PRAGMA foreign_key_list(t9);
115 } 115 }
116 } [concat \ 116 } [concat \
117 {0 0 t5 d {} {SET DEFAULT} CASCADE NONE} \ 117 {0 0 t5 d {} {SET DEFAULT} CASCADE NONE} \
118 {0 1 t5 e {} {SET DEFAULT} CASCADE NONE} \ 118 {0 1 t5 e {} {SET DEFAULT} CASCADE NONE} \
119 ] 119 ]
120 120
121 finish_test 121 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/filefmt.test ('k') | third_party/sqlite/src/test/fkey2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698