OLD | NEW |
1 # 2013-11-26 | 1 # 2013-11-26 |
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } {1 {PRIMARY KEY missing on table error3}} | 125 } {1 {PRIMARY KEY missing on table error3}} |
126 | 126 |
127 # EVIDENCE-OF: R-48230-36247 The special behaviors associated "INTEGER | 127 # EVIDENCE-OF: R-48230-36247 The special behaviors associated "INTEGER |
128 # PRIMARY KEY" do not apply on WITHOUT ROWID tables. | 128 # PRIMARY KEY" do not apply on WITHOUT ROWID tables. |
129 # | 129 # |
130 do_execsql_test without_rowid5-5.1 { | 130 do_execsql_test without_rowid5-5.1 { |
131 CREATE TABLE ipk(key INTEGER PRIMARY KEY, val TEXT) WITHOUT ROWID; | 131 CREATE TABLE ipk(key INTEGER PRIMARY KEY, val TEXT) WITHOUT ROWID; |
132 INSERT INTO ipk VALUES('rival','bonus'); -- ok to insert non-integer key | 132 INSERT INTO ipk VALUES('rival','bonus'); -- ok to insert non-integer key |
133 SELECT * FROM ipk; | 133 SELECT * FROM ipk; |
134 } {rival bonus} | 134 } {rival bonus} |
135 do_catchsql_test without_rowid5-5.2 { | 135 do_catchsql_test without_rowid5-5.2a { |
| 136 BEGIN; |
136 INSERT INTO ipk VALUES(NULL,'sample'); -- no automatic generation of keys | 137 INSERT INTO ipk VALUES(NULL,'sample'); -- no automatic generation of keys |
137 } {1 {NOT NULL constraint failed: ipk.key}} | 138 } {1 {NOT NULL constraint failed: ipk.key}} |
| 139 do_execsql_test without_rowid5-5.2b { |
| 140 ROLLBACK; |
| 141 } {} |
138 | 142 |
139 # EVIDENCE-OF: R-33142-02092 AUTOINCREMENT does not work on WITHOUT | 143 # EVIDENCE-OF: R-33142-02092 AUTOINCREMENT does not work on WITHOUT |
140 # ROWID tables. | 144 # ROWID tables. |
141 # | 145 # |
142 # EVIDENCE-OF: R-53084-07740 An error is raised if the "AUTOINCREMENT" | 146 # EVIDENCE-OF: R-53084-07740 An error is raised if the "AUTOINCREMENT" |
143 # keyword is used in the CREATE TABLE statement for a WITHOUT ROWID | 147 # keyword is used in the CREATE TABLE statement for a WITHOUT ROWID |
144 # table. | 148 # table. |
145 # | 149 # |
146 do_catchsql_test without_rowid5-5.3 { | 150 do_catchsql_test without_rowid5-5.3 { |
147 CREATE TABLE ipk2(key INTEGER PRIMARY KEY AUTOINCREMENT, val TEXT)WITHOUT ROWI
D; | 151 CREATE TABLE ipk2(key INTEGER PRIMARY KEY AUTOINCREMENT, val TEXT)WITHOUT ROWI
D; |
(...skipping 30 matching lines...) Expand all Loading... |
178 do_catchsql_test without_rowid5-5.8 { | 182 do_catchsql_test without_rowid5-5.8 { |
179 INSERT INTO nnw VALUES(4,5,6,7,NULL) | 183 INSERT INTO nnw VALUES(4,5,6,7,NULL) |
180 } {1 {NOT NULL constraint failed: nnw.e}} | 184 } {1 {NOT NULL constraint failed: nnw.e}} |
181 do_execsql_test without_rowid5-5.9 { | 185 do_execsql_test without_rowid5-5.9 { |
182 SELECT count(*) FROM nnw; | 186 SELECT count(*) FROM nnw; |
183 } {1} | 187 } {1} |
184 | 188 |
185 # EVIDENCE-OF: R-12643-30541 The incremental blob I/O mechanism does not | 189 # EVIDENCE-OF: R-12643-30541 The incremental blob I/O mechanism does not |
186 # work for WITHOUT ROWID tables. | 190 # work for WITHOUT ROWID tables. |
187 # | 191 # |
188 # EVIDENCE-OF: R-25760-33257 The sqlite3_blob_open() interface will fail | 192 # EVIDENCE-OF: R-40134-30296 Table zTable is a WITHOUT ROWID table |
189 # for a WITHOUT ROWID table. | |
190 # | 193 # |
191 do_execsql_test without_rowid5-6.1 { | 194 do_execsql_test without_rowid5-6.1 { |
192 CREATE TABLE b1(a INTEGER PRIMARY KEY, b BLOB) WITHOUT ROWID; | 195 CREATE TABLE b1(a INTEGER PRIMARY KEY, b BLOB) WITHOUT ROWID; |
193 INSERT INTO b1 VALUES(1,x'0102030405060708090a0b0c0d0e0f'); | 196 INSERT INTO b1 VALUES(1,x'0102030405060708090a0b0c0d0e0f'); |
194 } {} | 197 } {} |
195 do_test without_rowid5-6.2 { | 198 do_test without_rowid5-6.2 { |
196 set rc [catch {db incrblob b1 b 1} msg] | 199 set rc [catch {db incrblob b1 b 1} msg] |
197 lappend rc $msg | 200 lappend rc $msg |
198 } {1 {cannot open table without rowid: b1}} | 201 } {1 {cannot open table without rowid: b1}} |
199 | 202 |
200 | 203 |
201 finish_test | 204 finish_test |
OLD | NEW |