Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix some mappings from e_fkey.test. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
171c67138527750ec4af403f05389fae |
User & Date: | dan 2009-10-12 16:02:10.000 |
Context
2009-10-12
| ||
18:57 | Add more test cases to e_fkey.test. (check-in: 5633cb2b5b user: dan tags: trunk) | |
16:02 | Fix some mappings from e_fkey.test. (check-in: 171c671385 user: dan tags: trunk) | |
15:25 | Update e_fkey.test to match the latest version of foreignkeys.html. (check-in: a2ca9f1a7a user: dan tags: trunk) | |
Changes
Changes to test/e_fkey.test.
︙ | ︙ | |||
381 382 383 384 385 386 387 | } } {} do_test e_fkey-48.2 { catchsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', NULL) } } {1 {track.trackartist may not be NULL}} #------------------------------------------------------------------------- | | | 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | } } {} do_test e_fkey-48.2 { catchsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', NULL) } } {1 {track.trackartist may not be NULL}} #------------------------------------------------------------------------- # /* EV: R-17902-59250 */ # # Test an example from foreignkeys.html. # drop_all_tables do_test e_fkey-43.1 { execsql { CREATE TABLE artist( |
︙ | ︙ | |||
425 426 427 428 429 430 431 | INSERT INTO artist VALUES(3, 'Sammy Davis Jr.'); UPDATE track SET trackartist = 3 WHERE trackname = 'Mr. Bojangles'; INSERT INTO track VALUES(15, 'Boogie Woogie', 3); } } {} #------------------------------------------------------------------------- | | | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | INSERT INTO artist VALUES(3, 'Sammy Davis Jr.'); UPDATE track SET trackartist = 3 WHERE trackname = 'Mr. Bojangles'; INSERT INTO track VALUES(15, 'Boogie Woogie', 3); } } {} #------------------------------------------------------------------------- # /* EV: R-15034-64331 */ # # Test the second example from the first section of foreignkeys.html. # do_test e_fkey-44.1 { catchsql { DELETE FROM artist WHERE artistname = 'Frank Sinatra'; } |
︙ | ︙ | |||
569 570 571 572 573 574 575 | ########################################################################### ########################################################################### ### SECTION 4.1: Composite Foreign Key Constraints ########################################################################### #------------------------------------------------------------------------- | | | 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | ########################################################################### ########################################################################### ### SECTION 4.1: Composite Foreign Key Constraints ########################################################################### #------------------------------------------------------------------------- # /* EV: R-24676-09859 */ # # Test the example schema in the "Composite Foreign Key Constraints" # section. # do_test e_fkey-36.1 { execsql { CREATE TABLE album( |
︙ | ︙ | |||
856 857 858 859 860 861 862 | test_efkey_29 31 "UPDATE c5 SET a = 10" 1 test_efkey_29 31 "UPDATE c6 SET a = 10" 1 test_efkey_29 31 "UPDATE c7 SET a = 10" 0 test_efkey_29 32 "COMMIT" 1 test_efkey_29 33 "ROLLBACK" 0 #------------------------------------------------------------------------- | | | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 | test_efkey_29 31 "UPDATE c5 SET a = 10" 1 test_efkey_29 31 "UPDATE c6 SET a = 10" 1 test_efkey_29 31 "UPDATE c7 SET a = 10" 0 test_efkey_29 32 "COMMIT" 1 test_efkey_29 33 "ROLLBACK" 0 #------------------------------------------------------------------------- # /* EV: R-35043-01546 */ # # Test an example from foreignkeys.html dealing with a deferred foreign # key constraint. # do_test e_fkey-28.1 { drop_all_tables execsql { |
︙ | ︙ | |||
1630 1631 1632 1633 1634 1635 1636 | execsql { SELECT * FROM artist } } {0 {Unknown Artist}} do_test e_fkey-14.5 { execsql { SELECT * FROM track } } {14 {Mr. Bojangles} 0} #------------------------------------------------------------------------- | | | 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 | execsql { SELECT * FROM artist } } {0 {Unknown Artist}} do_test e_fkey-14.5 { execsql { SELECT * FROM track } } {14 {Mr. Bojangles} 0} #------------------------------------------------------------------------- # /* EV: R-09564-22170 */ # # Check that the order of steps in an UPDATE or DELETE on a parent # table is as follows: # # 1. Execute applicable BEFORE trigger programs, # 2. Check local (non foreign key) constraints, # 3. Update or delete the row in the parent table, |
︙ | ︙ |