OLD | NEW |
1 # 2005 February 19 | 1 # 2005 February 19 |
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 ifcapable schema_version { | 263 ifcapable schema_version { |
264 do_test alter3-5.4 { | 264 do_test alter3-5.4 { |
265 execsql { | 265 execsql { |
266 PRAGMA aux.schema_version; | 266 PRAGMA aux.schema_version; |
267 } | 267 } |
268 } {31} | 268 } {31} |
269 } | 269 } |
270 if {!$has_codec} { | 270 if {!$has_codec} { |
271 do_test alter3-5.5 { | 271 do_test alter3-5.5 { |
272 list [get_file_format test2.db] [get_file_format] | 272 list [get_file_format test2.db] [get_file_format] |
273 } {2 3} | 273 } {3 3} |
274 } | 274 } |
275 do_test alter3-5.6 { | 275 do_test alter3-5.6 { |
276 execsql { | 276 execsql { |
277 ALTER TABLE aux.t1 ADD COLUMN d DEFAULT 1000; | 277 ALTER TABLE aux.t1 ADD COLUMN d DEFAULT 1000; |
278 SELECT sql FROM aux.sqlite_master; | 278 SELECT sql FROM aux.sqlite_master; |
279 } | 279 } |
280 } {{CREATE TABLE t1(a,b, c VARCHAR(128), d DEFAULT 1000)}} | 280 } {{CREATE TABLE t1(a,b, c VARCHAR(128), d DEFAULT 1000)}} |
281 do_test alter3-5.7 { | 281 do_test alter3-5.7 { |
282 execsql { | 282 execsql { |
283 SELECT * FROM aux.t1; | 283 SELECT * FROM aux.t1; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 VACUUM; | 340 VACUUM; |
341 } | 341 } |
342 get_file_format | 342 get_file_format |
343 } {1} | 343 } {1} |
344 do_test alter3-7.2 { | 344 do_test alter3-7.2 { |
345 execsql { | 345 execsql { |
346 CREATE TABLE abc(a, b, c); | 346 CREATE TABLE abc(a, b, c); |
347 ALTER TABLE abc ADD d DEFAULT NULL; | 347 ALTER TABLE abc ADD d DEFAULT NULL; |
348 } | 348 } |
349 get_file_format | 349 get_file_format |
350 } {2} | 350 } {3} |
351 do_test alter3-7.3 { | 351 do_test alter3-7.3 { |
352 execsql { | 352 execsql { |
353 ALTER TABLE abc ADD e DEFAULT 10; | 353 ALTER TABLE abc ADD e DEFAULT 10; |
354 } | 354 } |
355 get_file_format | 355 get_file_format |
356 } {3} | 356 } {3} |
357 do_test alter3-7.4 { | 357 do_test alter3-7.4 { |
358 execsql { | 358 execsql { |
359 ALTER TABLE abc ADD f DEFAULT NULL; | 359 ALTER TABLE abc ADD f DEFAULT NULL; |
360 } | 360 } |
(...skipping 27 matching lines...) Expand all Loading... |
388 set ::sql "CREATE TABLE t4([join $cols {, }])" | 388 set ::sql "CREATE TABLE t4([join $cols {, }])" |
389 list | 389 list |
390 } {} | 390 } {} |
391 do_test alter3-8.2 { | 391 do_test alter3-8.2 { |
392 execsql { | 392 execsql { |
393 SELECT sql FROM sqlite_master WHERE name = 't4'; | 393 SELECT sql FROM sqlite_master WHERE name = 't4'; |
394 } | 394 } |
395 } [list $::sql] | 395 } [list $::sql] |
396 | 396 |
397 finish_test | 397 finish_test |
OLD | NEW |