mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Standardize the error messages generated by constraint failures to a format
of "$TYPE constraint failed: $DETAIL". This involves many changes to the expected output of test cases. FossilOrigin-Name: 54b221929744b1bcdbcc2030fef2e510618afd41
This commit is contained in:
122
manifest
122
manifest
@ -1,5 +1,5 @@
|
|||||||
C Add\sthe\sconflict2.test\sscript.\s\sFix\sissues\sdiscovered\sby\sthis\sscript.
|
C Standardize\sthe\serror\smessages\sgenerated\sby\sconstraint\sfailures\sto\sa\sformat\nof\s"$TYPE\sconstraint\sfailed:\s$DETAIL".\s\sThis\sinvolves\smany\schanges\sto\sthe\nexpected\soutput\sof\stest\scases.
|
||||||
D 2013-11-05T01:59:07.014
|
D 2013-11-05T13:33:55.491
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in 0522b53cdc1fcfc18f3a98e0246add129136c654
|
F Makefile.in 0522b53cdc1fcfc18f3a98e0246add129136c654
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@ -168,26 +168,26 @@ F src/btmutex.c 976f45a12e37293e32cae0281b15a21d48a8aaa7
|
|||||||
F src/btree.c 509722ce305471b626d3401c0631a808fd33237b
|
F src/btree.c 509722ce305471b626d3401c0631a808fd33237b
|
||||||
F src/btree.h bfe0e8c5759b4ec77b0d18390064a6ef3cdffaaf
|
F src/btree.h bfe0e8c5759b4ec77b0d18390064a6ef3cdffaaf
|
||||||
F src/btreeInt.h f038e818bfadf75afbd09819ed93c26a333d39e0
|
F src/btreeInt.h f038e818bfadf75afbd09819ed93c26a333d39e0
|
||||||
F src/build.c 309f387dae4aa267ec0371fe69b76831d639b367
|
F src/build.c 6790e7b7023935b03666a0a2ab3c4da78165d661
|
||||||
F src/callback.c f99a8957ba2adf369645fac0db09ad8adcf1caa2
|
F src/callback.c f99a8957ba2adf369645fac0db09ad8adcf1caa2
|
||||||
F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
|
F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
|
||||||
F src/ctime.c ea4b7f3623a0fcb1146e7f245d7410033e86859c
|
F src/ctime.c ea4b7f3623a0fcb1146e7f245d7410033e86859c
|
||||||
F src/date.c 593c744b2623971e45affd0bde347631bdfa4625
|
F src/date.c 593c744b2623971e45affd0bde347631bdfa4625
|
||||||
F src/delete.c f4e0dc7b804fc0eb1a040e3e6ac7aaf341834e39
|
F src/delete.c f4e0dc7b804fc0eb1a040e3e6ac7aaf341834e39
|
||||||
F src/expr.c ecc2b98eb75fe5533cfdfcca6b04cfe5f0c6001f
|
F src/expr.c b77efad2426619473b7762146bc9036325c263f9
|
||||||
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
|
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
|
||||||
F src/fkey.c 24bbd27a963c8e022a79579964885cc638567c88
|
F src/fkey.c c82c3aa57b4d71387092428e4bedec16bb396015
|
||||||
F src/func.c 2c47b65e6e00e3e9374942f28254faf8adafe398
|
F src/func.c 2c47b65e6e00e3e9374942f28254faf8adafe398
|
||||||
F src/global.c 5caf4deab621abb45b4c607aad1bd21c20aac759
|
F src/global.c 5caf4deab621abb45b4c607aad1bd21c20aac759
|
||||||
F src/hash.c ac3470bbf1ca4ae4e306a8ecb0fdf1731810ffe4
|
F src/hash.c ac3470bbf1ca4ae4e306a8ecb0fdf1731810ffe4
|
||||||
F src/hash.h 8890a25af81fb85a9ad7790d32eedab4b994da22
|
F src/hash.h 8890a25af81fb85a9ad7790d32eedab4b994da22
|
||||||
F src/hwtime.h d32741c8f4df852c7d959236615444e2b1063b08
|
F src/hwtime.h d32741c8f4df852c7d959236615444e2b1063b08
|
||||||
F src/insert.c 7f6a62008e0f70bac2e808977544de2272ba0160
|
F src/insert.c 63660d2ec840c43c212fbfe3805a162e4e6eafc7
|
||||||
F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
|
F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
|
||||||
F src/legacy.c 0df0b1550b9cc1f58229644735e317ac89131f12
|
F src/legacy.c 0df0b1550b9cc1f58229644735e317ac89131f12
|
||||||
F src/lempar.c cdf0a000315332fc9b50b62f3b5e22e080a0952b
|
F src/lempar.c cdf0a000315332fc9b50b62f3b5e22e080a0952b
|
||||||
F src/loadext.c 867c7b330b740c6c917af9956b13b81d0a048303
|
F src/loadext.c 867c7b330b740c6c917af9956b13b81d0a048303
|
||||||
F src/main.c 35931467ec026b05babb279cb8a573e62f6fe1a3
|
F src/main.c 9bcfc400b5f727dd562996d0bdf507bfbcf31583
|
||||||
F src/malloc.c 543a8eb5508eaf4cadf55a9b503379eba2088128
|
F src/malloc.c 543a8eb5508eaf4cadf55a9b503379eba2088128
|
||||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||||
F src/mem1.c 437c7c4af964895d4650f29881df63535caaa1fa
|
F src/mem1.c 437c7c4af964895d4650f29881df63535caaa1fa
|
||||||
@ -220,10 +220,10 @@ F src/resolve.c e729889b2c7a680ba4aa7296efa72c09369956d8
|
|||||||
F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
|
F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
|
||||||
F src/select.c 8290456f2a516abaf8cbbed5e61944d3082e497e
|
F src/select.c 8290456f2a516abaf8cbbed5e61944d3082e497e
|
||||||
F src/shell.c 03d8d9b4052430343ff30d646334621f980f1202
|
F src/shell.c 03d8d9b4052430343ff30d646334621f980f1202
|
||||||
F src/sqlite.h.in 547a44dd4ff4d975e92a645ea2d609e543a83d0f
|
F src/sqlite.h.in a8cad179541b8d171fed425a737084702ef462ef
|
||||||
F src/sqlite3.rc 11094cc6a157a028b301a9f06b3d03089ea37c3e
|
F src/sqlite3.rc 11094cc6a157a028b301a9f06b3d03089ea37c3e
|
||||||
F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc
|
F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc
|
||||||
F src/sqliteInt.h 0d272caa9b943c7e20b9c9924c6d793aece6ee0d
|
F src/sqliteInt.h 765c394183e829b0d31bb022b403141ded4c2bd1
|
||||||
F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
|
F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
|
||||||
F src/status.c 7ac05a5c7017d0b9f0b4bcd701228b784f987158
|
F src/status.c 7ac05a5c7017d0b9f0b4bcd701228b784f987158
|
||||||
F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e
|
F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e
|
||||||
@ -279,11 +279,11 @@ F src/update.c c60e6169d7ae29a269cca03be44fb859f9ef78d9
|
|||||||
F src/utf.c 6fc6c88d50448c469c5c196acf21617a24f90269
|
F src/utf.c 6fc6c88d50448c469c5c196acf21617a24f90269
|
||||||
F src/util.c 2fa6c821d28bbdbeec1b2a7b091a281c9ef8f918
|
F src/util.c 2fa6c821d28bbdbeec1b2a7b091a281c9ef8f918
|
||||||
F src/vacuum.c 3728d74919d4fb1356f9e9a13e27773db60b7179
|
F src/vacuum.c 3728d74919d4fb1356f9e9a13e27773db60b7179
|
||||||
F src/vdbe.c 8bab888622f007944e24da09680c3517800a7a91
|
F src/vdbe.c 94da71c02856981ce5f8eccc1f01cceeaedb2468
|
||||||
F src/vdbe.h c18a2dd91c838601b867a214e43c5f66d5d001ba
|
F src/vdbe.h 6a52f68c46ebfc1bef4cfda58fe5d94289dde216
|
||||||
F src/vdbeInt.h f2fa3ceccceeb757773921fb08af7c6e9f3caa1c
|
F src/vdbeInt.h f2fa3ceccceeb757773921fb08af7c6e9f3caa1c
|
||||||
F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed
|
F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed
|
||||||
F src/vdbeaux.c cf6d0bc68fd1783747909cd14387bc06ac10a4e2
|
F src/vdbeaux.c 6508022e5cdd936f25f12800970727c6ef83d54c
|
||||||
F src/vdbeblob.c ff60adf2953e0ffc1d59541b3101c9886b03a3de
|
F src/vdbeblob.c ff60adf2953e0ffc1d59541b3101c9886b03a3de
|
||||||
F src/vdbemem.c c84e2bc3b8ebef3fbc4c2d811cdf9413c7062c3f
|
F src/vdbemem.c c84e2bc3b8ebef3fbc4c2d811cdf9413c7062c3f
|
||||||
F src/vdbesort.c 9d83601f9d6243fe70dd0169a2820c5ddfd48147
|
F src/vdbesort.c 9d83601f9d6243fe70dd0169a2820c5ddfd48147
|
||||||
@ -330,7 +330,7 @@ F test/auth2.test c3b415b76c033bedb81292118fb7c01f5f10cbcd
|
|||||||
F test/auth3.test a4755e6a2a2fea547ffe63c874eb569e60a28eb5
|
F test/auth3.test a4755e6a2a2fea547ffe63c874eb569e60a28eb5
|
||||||
F test/autoinc.test bd30d372d00045252f6c2e41b5f41455e1975acf
|
F test/autoinc.test bd30d372d00045252f6c2e41b5f41455e1975acf
|
||||||
F test/autoindex1.test d4dfe14001dfcb74cfbd7107f45a79fc1ab6183e
|
F test/autoindex1.test d4dfe14001dfcb74cfbd7107f45a79fc1ab6183e
|
||||||
F test/autovacuum.test 9f22a7733f39c56ef6a5665d10145ac25d8cb574
|
F test/autovacuum.test 941892505d2c0f410a0cb5970dfa1c7c4e5f6e74
|
||||||
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
|
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
|
||||||
F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85
|
F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85
|
||||||
F test/backcompat.test cf76ac18830b61df960f74229e1a4107258d3ee0
|
F test/backcompat.test cf76ac18830b61df960f74229e1a4107258d3ee0
|
||||||
@ -361,21 +361,21 @@ F test/boundary4.test 89e02fa66397b8a325d5eb102b5806f961f8ec4b
|
|||||||
F test/btreefault.test c2bcb542685eea44621275cfedbd8a13f65201e3
|
F test/btreefault.test c2bcb542685eea44621275cfedbd8a13f65201e3
|
||||||
F test/busy.test 76b4887f8b9160ba903c1ac22e8ff406ad6ae2f0
|
F test/busy.test 76b4887f8b9160ba903c1ac22e8ff406ad6ae2f0
|
||||||
F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
|
F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
|
||||||
F test/capi2.test e8b18cc61090b6e5e388f54d6b125d711d1b265a
|
F test/capi2.test 011c16da245fdc0106a2785035de6b242c05e738
|
||||||
F test/capi3.test 56ab450125ead38846cbae7e5b6a216686c3cffa
|
F test/capi3.test 56ab450125ead38846cbae7e5b6a216686c3cffa
|
||||||
F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4
|
F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4
|
||||||
F test/capi3c.test 93d24621c9ff84da9da060f30431e0453db1cdb0
|
F test/capi3c.test 93d24621c9ff84da9da060f30431e0453db1cdb0
|
||||||
F test/capi3d.test 6d0fc0a86d73f42dd19a7d8b7761ab9bc02277d0
|
F test/capi3d.test 6d0fc0a86d73f42dd19a7d8b7761ab9bc02277d0
|
||||||
F test/capi3e.test ad90088b18b0367125ff2d4b5400153fd2f99aab
|
F test/capi3e.test ad90088b18b0367125ff2d4b5400153fd2f99aab
|
||||||
F test/cast.test 4c275cbdc8202d6f9c54a3596701719868ac7dc3
|
F test/cast.test 4c275cbdc8202d6f9c54a3596701719868ac7dc3
|
||||||
F test/check.test 1e9be446eb0bbd47a5f65955802e9632425096ab
|
F test/check.test 5831ddb6f2c687782eaf2e1a07b6e17f24c4f763
|
||||||
F test/close.test 340bd24cc58b16c6bc01967402755027c37eb815
|
F test/close.test 340bd24cc58b16c6bc01967402755027c37eb815
|
||||||
F test/closure01.test dbb28f1ea9eeaf0a53ec5bc0fed352e479def8c7
|
F test/closure01.test dbb28f1ea9eeaf0a53ec5bc0fed352e479def8c7
|
||||||
F test/coalesce.test cee0dccb9fbd2d494b77234bccf9dc6c6786eb91
|
F test/coalesce.test cee0dccb9fbd2d494b77234bccf9dc6c6786eb91
|
||||||
F test/collate1.test b709989e6e6ff6e1d2bd64231c2c1d8146846c9e
|
F test/collate1.test b709989e6e6ff6e1d2bd64231c2c1d8146846c9e
|
||||||
F test/collate2.test 9aaa410a00734e48bcb27f3872617d6f69b2a621
|
F test/collate2.test 9aaa410a00734e48bcb27f3872617d6f69b2a621
|
||||||
F test/collate3.test 79558a286362cb9ed603c6fa543f1cda7f563f0f
|
F test/collate3.test 79558a286362cb9ed603c6fa543f1cda7f563f0f
|
||||||
F test/collate4.test 1768c1f373eccbd40a519ed64e7fbfd6867290da
|
F test/collate4.test f04d5168685f2eef637ecfa2d4ddf8ec0d600177
|
||||||
F test/collate5.test 65d928034d30d2d263a80f6359f7549ee1598ec6
|
F test/collate5.test 65d928034d30d2d263a80f6359f7549ee1598ec6
|
||||||
F test/collate6.test 8be65a182abaac8011a622131486dafb8076e907
|
F test/collate6.test 8be65a182abaac8011a622131486dafb8076e907
|
||||||
F test/collate7.test 8ec29d98f3ee4ccebce6e16ce3863fb6b8c7b868
|
F test/collate7.test 8ec29d98f3ee4ccebce6e16ce3863fb6b8c7b868
|
||||||
@ -384,8 +384,8 @@ F test/collate9.test 3adcc799229545940df2f25308dd1ad65869145a
|
|||||||
F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
|
F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
|
||||||
F test/colmeta.test 087c42997754b8c648819832241daf724f813322
|
F test/colmeta.test 087c42997754b8c648819832241daf724f813322
|
||||||
F test/colname.test 08948a4809d22817e0e5de89c7c0a8bd90cb551b
|
F test/colname.test 08948a4809d22817e0e5de89c7c0a8bd90cb551b
|
||||||
F test/conflict.test 0b3922d2304a14a47e3ccd61bbd6824327af659b
|
F test/conflict.test 841bcf7cabbfca39c577eb8411ea8601843b46a8
|
||||||
F test/conflict2.test 73b8cfed6a04571cc79d36e55c09d79d15187201
|
F test/conflict2.test 5d162ecbbde37f165de1992904dcbbed9fc7c012
|
||||||
F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4
|
F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4
|
||||||
F test/corrupt.test 4aabd06cff3fe759e3e658bcc17b71789710665e
|
F test/corrupt.test 4aabd06cff3fe759e3e658bcc17b71789710665e
|
||||||
F test/corrupt2.test 9c0ab4becd50e9050bc1ebb8675456a4e5587bf0
|
F test/corrupt2.test 9c0ab4becd50e9050bc1ebb8675456a4e5587bf0
|
||||||
@ -430,19 +430,19 @@ F test/descidx3.test 09ddbe3f5295f482d2f8b687cf6db8bad7acd9a2
|
|||||||
F test/diskfull.test 106391384780753ea6896b7b4f005d10e9866b6e
|
F test/diskfull.test 106391384780753ea6896b7b4f005d10e9866b6e
|
||||||
F test/distinct.test 44028aaf161a5e80a2f229622b3a174d3b352810
|
F test/distinct.test 44028aaf161a5e80a2f229622b3a174d3b352810
|
||||||
F test/distinctagg.test 1a6ef9c87a58669438fc771450d7a72577417376
|
F test/distinctagg.test 1a6ef9c87a58669438fc771450d7a72577417376
|
||||||
F test/e_createtable.test b0dcad4160781e8fe703acee200ca455ad25fe51
|
F test/e_createtable.test f1d21fa142391917b1fa84cf985ac6c63dfcbe4d
|
||||||
F test/e_delete.test d5186e2f5478b659f16a2c8b66c09892823e542a
|
F test/e_delete.test d5186e2f5478b659f16a2c8b66c09892823e542a
|
||||||
F test/e_droptrigger.test 3cd080807622c13e5bbb61fc9a57bd7754da2412
|
F test/e_droptrigger.test 3cd080807622c13e5bbb61fc9a57bd7754da2412
|
||||||
F test/e_dropview.test 0c9f7f60989164a70a67a9d9c26d1083bc808306
|
F test/e_dropview.test 0c9f7f60989164a70a67a9d9c26d1083bc808306
|
||||||
F test/e_expr.test d5cdda0e4ffb17760858ed4c7c4ece07efc40f71
|
F test/e_expr.test d5cdda0e4ffb17760858ed4c7c4ece07efc40f71
|
||||||
F test/e_fkey.test 17cfb40002d165299681f39aac0cb5890c359935
|
F test/e_fkey.test d83a04478bb9c02d2c513518548a69f818869f41
|
||||||
F test/e_fts3.test 5c02288842e4f941896fd44afdef564dd5fc1459
|
F test/e_fts3.test 5c02288842e4f941896fd44afdef564dd5fc1459
|
||||||
F test/e_insert.test 291e056e1a442a5e5166a989a8a03a46e38225ca
|
F test/e_insert.test 1e44f84d2abe44d66e4fbf198be4b20e3cc724a0
|
||||||
F test/e_reindex.test 396b7b4f0a66863b4e95116a67d93b227193e589
|
F test/e_reindex.test 396b7b4f0a66863b4e95116a67d93b227193e589
|
||||||
F test/e_resolve.test dcce9308fb13b934ce29591105d031d3e14fbba6
|
F test/e_resolve.test dcce9308fb13b934ce29591105d031d3e14fbba6
|
||||||
F test/e_select.test d3226cb94fae4af3f198e68e71f655e106d0be47
|
F test/e_select.test d3226cb94fae4af3f198e68e71f655e106d0be47
|
||||||
F test/e_select2.test 22c660a7becf0712c95e1ca1b2d9e716a1261460
|
F test/e_select2.test 22c660a7becf0712c95e1ca1b2d9e716a1261460
|
||||||
F test/e_update.test bea00499e43ee1da77b03cdb0b20c7c864c1ec5a
|
F test/e_update.test 312cb8f5ccfe41515a6bb092f8ea562a9bd54d52
|
||||||
F test/e_uri.test a2c92d80093a7efdcfbb11093651cbea87097b6b
|
F test/e_uri.test a2c92d80093a7efdcfbb11093651cbea87097b6b
|
||||||
F test/e_vacuum.test 5bfbdc21b65c0abf24398d0ba31dc88d93ca77a9
|
F test/e_vacuum.test 5bfbdc21b65c0abf24398d0ba31dc88d93ca77a9
|
||||||
F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea
|
F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea
|
||||||
@ -450,7 +450,7 @@ F test/enc2.test 83437a79ba1545a55fb549309175c683fb334473
|
|||||||
F test/enc3.test 90683ad0e6ea587b9d5542ca93568af9a9858c40
|
F test/enc3.test 90683ad0e6ea587b9d5542ca93568af9a9858c40
|
||||||
F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
|
F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
|
||||||
F test/eqp.test 57c6c604c2807fb5531731c5323133453c24afac
|
F test/eqp.test 57c6c604c2807fb5531731c5323133453c24afac
|
||||||
F test/errmsg.test 050717f1c6a5685de9c79f5f9f6b83d7c592f73a
|
F test/errmsg.test f31592a594b44ee121371d25ddd5d63497bb3401
|
||||||
F test/eval.test bc269c365ba877554948441e91ad5373f9f91be3
|
F test/eval.test bc269c365ba877554948441e91ad5373f9f91be3
|
||||||
F test/exclusive.test c7ebbc756eacf544c108b15eed64d7d4e5f86b75
|
F test/exclusive.test c7ebbc756eacf544c108b15eed64d7d4e5f86b75
|
||||||
F test/exclusive2.test 881193eccec225cfed9d7f744b65e57f26adee25
|
F test/exclusive2.test 881193eccec225cfed9d7f744b65e57f26adee25
|
||||||
@ -461,11 +461,11 @@ F test/fallocate.test 3e979af17dfa7e5e9dda5eba1a696c04fa9d47f7
|
|||||||
F test/filectrl.test 14fa712e42c4cb791e09dfd58a6a03efb47ef13a
|
F test/filectrl.test 14fa712e42c4cb791e09dfd58a6a03efb47ef13a
|
||||||
F test/filefmt.test cb34663f126cbc2d358af552dcaf5c72769b0146
|
F test/filefmt.test cb34663f126cbc2d358af552dcaf5c72769b0146
|
||||||
F test/fkey1.test e1d1fa84cde579185ea01358436839703e415a5b
|
F test/fkey1.test e1d1fa84cde579185ea01358436839703e415a5b
|
||||||
F test/fkey2.test c9b3a4f1e67546a92b568de59d555eaf5480ed65
|
F test/fkey2.test 32ca728bcb854feed72d1406ea375fe423eebff2
|
||||||
F test/fkey3.test 5ec899d12b13bcf1e9ef40eff7fb692fdb91392e
|
F test/fkey3.test 76d475c80b84ee7a5d062e56ccb6ea68882e2b49
|
||||||
F test/fkey4.test 86446017011273aad8f9a99c1a65019e7bd9ca9d
|
F test/fkey4.test 86446017011273aad8f9a99c1a65019e7bd9ca9d
|
||||||
F test/fkey5.test 8a1fde4e7721ae00b05b3178888833726ca2df8d
|
F test/fkey5.test 8a1fde4e7721ae00b05b3178888833726ca2df8d
|
||||||
F test/fkey6.test 18e8c024d39f68f8d4bb1177c992bcffdc273464
|
F test/fkey6.test abb59f866c1b44926fd02d1fdd217d831fe04f48
|
||||||
F test/fkey7.test e31d0e71a41c1d29349a16448d6c420e2c53a8fc
|
F test/fkey7.test e31d0e71a41c1d29349a16448d6c420e2c53a8fc
|
||||||
F test/fkey_malloc.test bb74c9cb8f8fceed03b58f8a7ef2df98520bbd51
|
F test/fkey_malloc.test bb74c9cb8f8fceed03b58f8a7ef2df98520bbd51
|
||||||
F test/format4.test 1f0cac8ff3895e9359ed87e41aaabee982a812eb
|
F test/format4.test 1f0cac8ff3895e9359ed87e41aaabee982a812eb
|
||||||
@ -572,7 +572,7 @@ F test/full.test 6b3c8fb43c6beab6b95438c1675374b95fab245d
|
|||||||
F test/func.test c7e80a44eebac8604397eb2ad83d0d5d9d541237
|
F test/func.test c7e80a44eebac8604397eb2ad83d0d5d9d541237
|
||||||
F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
|
F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
|
||||||
F test/func3.test dbccee9133cfef1473c59ec07b5f0262b9d72f9a
|
F test/func3.test dbccee9133cfef1473c59ec07b5f0262b9d72f9a
|
||||||
F test/func4.test cb3f888a1cafad195a1f8d396875bdb11dc4faf9
|
F test/func4.test 6beacdfcb0e18c358e6c2dcacf1b65d1fa80955f
|
||||||
F test/fuzz-oss1.test 4912e528ec9cf2f42134456933659d371c9e0d74
|
F test/fuzz-oss1.test 4912e528ec9cf2f42134456933659d371c9e0d74
|
||||||
F test/fuzz.test 77fd50afc12847af50fcf1941679d90adebadde6
|
F test/fuzz.test 77fd50afc12847af50fcf1941679d90adebadde6
|
||||||
F test/fuzz2.test 207d0f9d06db3eaf47a6b7bfc835b8e2fc397167
|
F test/fuzz2.test 207d0f9d06db3eaf47a6b7bfc835b8e2fc397167
|
||||||
@ -584,13 +584,13 @@ F test/fuzzerfault.test 8792cd77fd5bce765b05d0c8e01b9edcf8af8536
|
|||||||
F test/genesis.tcl 1e2e2e8e5cc4058549a154ff1892fe5c9de19f98
|
F test/genesis.tcl 1e2e2e8e5cc4058549a154ff1892fe5c9de19f98
|
||||||
F test/hook.test 45cb22b940c3cc0af616ba7430f666e245711a48
|
F test/hook.test 45cb22b940c3cc0af616ba7430f666e245711a48
|
||||||
F test/icu.test 70df4faca133254c042d02ae342c0a141f2663f4
|
F test/icu.test 70df4faca133254c042d02ae342c0a141f2663f4
|
||||||
F test/in.test 5941096407d8c133b9eff15bd3e666624b6cbde3
|
F test/in.test 047c4671328e9032ab95666a67021adbbd36e98e
|
||||||
F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
|
F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
|
||||||
F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
|
F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
|
||||||
F test/in4.test 64f3cc1acde1b9161ccdd8e5bde3daefdb5b2617
|
F test/in4.test 64f3cc1acde1b9161ccdd8e5bde3daefdb5b2617
|
||||||
F test/in5.test 99f9a40af01711b06d2d614ecfe96129f334fba3
|
F test/in5.test 99f9a40af01711b06d2d614ecfe96129f334fba3
|
||||||
F test/incrblob.test e81846d214f3637622620fbde7cd526781cfe328
|
F test/incrblob.test e81846d214f3637622620fbde7cd526781cfe328
|
||||||
F test/incrblob2.test edc3a96e557bd61fb39acc8d2edd43371fbbaa19
|
F test/incrblob2.test bf4d549aa4a466d7fbe3e3a3693d3861263d5600
|
||||||
F test/incrblob3.test d8d036fde015d4a159cd3cbae9d29003b37227a4
|
F test/incrblob3.test d8d036fde015d4a159cd3cbae9d29003b37227a4
|
||||||
F test/incrblob4.test f26502a5697893e5acea268c910f16478c2f0fab
|
F test/incrblob4.test f26502a5697893e5acea268c910f16478c2f0fab
|
||||||
F test/incrblob_err.test d2562d2771ebffd4b3af89ef64c140dd44371597
|
F test/incrblob_err.test d2562d2771ebffd4b3af89ef64c140dd44371597
|
||||||
@ -599,25 +599,25 @@ F test/incrvacuum.test d2a6ddf5e429720b5fe502766af747915ccf6c32
|
|||||||
F test/incrvacuum2.test 379eeb8740b0ef60c372c439ad4cbea20b34bb9b
|
F test/incrvacuum2.test 379eeb8740b0ef60c372c439ad4cbea20b34bb9b
|
||||||
F test/incrvacuum3.test 75256fb1377e7c39ef2de62bfc42bbff67be295a
|
F test/incrvacuum3.test 75256fb1377e7c39ef2de62bfc42bbff67be295a
|
||||||
F test/incrvacuum_ioerr.test 6ae2f783424e47a0033304808fe27789cf93e635
|
F test/incrvacuum_ioerr.test 6ae2f783424e47a0033304808fe27789cf93e635
|
||||||
F test/index.test f2abacfb83d384ae36b8a919fbd94b1319333e55
|
F test/index.test 4d990005a67a36984e4f1a5f1bdccea8d08da4ee
|
||||||
F test/index2.test ee83c6b5e3173a3d7137140d945d9a5d4fdfb9d6
|
F test/index2.test ee83c6b5e3173a3d7137140d945d9a5d4fdfb9d6
|
||||||
F test/index3.test 423a25c789fc8cc51aaf2a4370bbdde2d9e9eed7
|
F test/index3.test 55a90cff99834305e8141df7afaef39674b57062
|
||||||
F test/index4.test 2983216eb8c86ee62d9ed7cb206b5cc3331c0026
|
F test/index4.test ab92e736d5946840236cd61ac3191f91a7856bf6
|
||||||
F test/index5.test fc07c14193c0430814e7a08b5da46888ee795c33
|
F test/index5.test fc07c14193c0430814e7a08b5da46888ee795c33
|
||||||
F test/index6.test 9996f064672c03e768e256e4bf7cff4b63e8b109
|
F test/index6.test 936979c3a1e87b81feaed2d00505665bf142d764
|
||||||
F test/index7.test d38186768f58937fcb29c11aa03b19caadb0aeae
|
F test/index7.test a3baf9a625bda7fd49471e99aeae04095fbfeecf
|
||||||
F test/indexedby.test b2f22f3e693a53813aa3f50b812eb609ba6df1ec
|
F test/indexedby.test b2f22f3e693a53813aa3f50b812eb609ba6df1ec
|
||||||
F test/indexfault.test 31d4ab9a7d2f6e9616933eb079722362a883eb1d
|
F test/indexfault.test 31d4ab9a7d2f6e9616933eb079722362a883eb1d
|
||||||
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
|
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
|
||||||
F test/insert.test 489aa12a027c83d291f5034a83c8c32e6be1dca2
|
F test/insert.test 489aa12a027c83d291f5034a83c8c32e6be1dca2
|
||||||
F test/insert2.test 4f3a04d168c728ed5ec2c88842e772606c7ce435
|
F test/insert2.test 4f3a04d168c728ed5ec2c88842e772606c7ce435
|
||||||
F test/insert3.test 1b7db95a03ad9c5013fdf7d6722b6cd66ee55e30
|
F test/insert3.test 1b7db95a03ad9c5013fdf7d6722b6cd66ee55e30
|
||||||
F test/insert4.test 87f6798f31d60c4e177622fcc3663367e6ecbd90
|
F test/insert4.test b00ddf82d6d4f0a6f3999f42bb6a3c813ea70707
|
||||||
F test/insert5.test 394f96728d1258f406fe5f5aeb0aaf29487c39a6
|
F test/insert5.test 394f96728d1258f406fe5f5aeb0aaf29487c39a6
|
||||||
F test/instr.test 737bbf80685232033f3abedc6ae92f75860b5dd2
|
F test/instr.test 737bbf80685232033f3abedc6ae92f75860b5dd2
|
||||||
F test/intarray.test 066b7d7ac38d25bf96f87f1b017bfc687551cdd4
|
F test/intarray.test 066b7d7ac38d25bf96f87f1b017bfc687551cdd4
|
||||||
F test/interrupt.test dfe9a67a94b0b2d8f70545ba1a6cca10780d71cc
|
F test/interrupt.test dfe9a67a94b0b2d8f70545ba1a6cca10780d71cc
|
||||||
F test/intpkey.test a9674fc6195e0952e4e6105a9981ce1e48e7f215
|
F test/intpkey.test 7506090fc08e028712a8bf47e5f54111947e3844
|
||||||
F test/io.test 3a7abcef18727cc0f2399e04b0e8903eccae50f8
|
F test/io.test 3a7abcef18727cc0f2399e04b0e8903eccae50f8
|
||||||
F test/ioerr.test 40bb2cfcab63fb6aa7424cd97812a84bc16b5fb8
|
F test/ioerr.test 40bb2cfcab63fb6aa7424cd97812a84bc16b5fb8
|
||||||
F test/ioerr2.test 9d71166f8466eda510f1af6137bdabaa82b5408d
|
F test/ioerr2.test 9d71166f8466eda510f1af6137bdabaa82b5408d
|
||||||
@ -679,7 +679,7 @@ F test/mallocK.test d79968641d1b70d88f6c01bdb9a7eb4a55582cc9
|
|||||||
F test/malloc_common.tcl 58e54229c4132ef882a11fab6419ec4cd3073589
|
F test/malloc_common.tcl 58e54229c4132ef882a11fab6419ec4cd3073589
|
||||||
F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
|
F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
|
||||||
F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
|
F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
|
||||||
F test/memdb.test db5260330676de007be8530d6ecc7c9ab2b06ad3
|
F test/memdb.test fcb5297b321b562084fc79d64d5a12a1cd2b639b
|
||||||
F test/memleak.test 10b9c6c57e19fc68c32941495e9ba1c50123f6e2
|
F test/memleak.test 10b9c6c57e19fc68c32941495e9ba1c50123f6e2
|
||||||
F test/memsubsys1.test f97cfd0b30e85c2f1ed16d642e7ac58006be84b2
|
F test/memsubsys1.test f97cfd0b30e85c2f1ed16d642e7ac58006be84b2
|
||||||
F test/memsubsys2.test 3a1c1a9de48e5726faa85108b02459fae8cb9ee9
|
F test/memsubsys2.test 3a1c1a9de48e5726faa85108b02459fae8cb9ee9
|
||||||
@ -687,7 +687,7 @@ F test/minmax.test 42fbad0e81afaa6e0de41c960329f2b2c3526efd
|
|||||||
F test/minmax2.test b44bae787fc7b227597b01b0ca5575c7cb54d3bc
|
F test/minmax2.test b44bae787fc7b227597b01b0ca5575c7cb54d3bc
|
||||||
F test/minmax3.test cc1e8b010136db0d01a6f2a29ba5a9f321034354
|
F test/minmax3.test cc1e8b010136db0d01a6f2a29ba5a9f321034354
|
||||||
F test/minmax4.test 536a3360470633a177e42fbc19660d146b51daef
|
F test/minmax4.test 536a3360470633a177e42fbc19660d146b51daef
|
||||||
F test/misc1.test fc2e45c71d630d87382c8866ef2ca84dc0d57219
|
F test/misc1.test 9bed1bd334065a57dc841cff969d4fc1eeb6d49b
|
||||||
F test/misc2.test 00d7de54eda90e237fc9a38b9e5ccc769ebf6d4d
|
F test/misc2.test 00d7de54eda90e237fc9a38b9e5ccc769ebf6d4d
|
||||||
F test/misc3.test cf3dda47d5dda3e53fc5804a100d3c82be736c9d
|
F test/misc3.test cf3dda47d5dda3e53fc5804a100d3c82be736c9d
|
||||||
F test/misc4.test 9c078510fbfff05a9869a0b6d8b86a623ad2c4f6
|
F test/misc4.test 9c078510fbfff05a9869a0b6d8b86a623ad2c4f6
|
||||||
@ -708,7 +708,7 @@ F test/nan.test e9648b9d007c7045242af35e11a984d4b169443a
|
|||||||
F test/notify1.test 669b2b743618efdc18ca4b02f45423d5d2304abf
|
F test/notify1.test 669b2b743618efdc18ca4b02f45423d5d2304abf
|
||||||
F test/notify2.test ce23eb522c9e1fff6443f96376fe67872202061c
|
F test/notify2.test ce23eb522c9e1fff6443f96376fe67872202061c
|
||||||
F test/notify3.test 10ff25cde502e72a92053a2f215d64bece4ef934
|
F test/notify3.test 10ff25cde502e72a92053a2f215d64bece4ef934
|
||||||
F test/notnull.test 2afad748d18fd66d01f66463de73b3e2501fb226
|
F test/notnull.test f8fcf58669ddba79274daa2770d61dfad8274f62
|
||||||
F test/null.test a8b09b8ed87852742343b33441a9240022108993
|
F test/null.test a8b09b8ed87852742343b33441a9240022108993
|
||||||
F test/numcast.test 5d126f7f581432e86a90d1e35cac625164aec4a1
|
F test/numcast.test 5d126f7f581432e86a90d1e35cac625164aec4a1
|
||||||
F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394
|
F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394
|
||||||
@ -718,7 +718,7 @@ F test/orderby3.test 8619d06a3debdcd80a27c0fdea5c40b468854b99
|
|||||||
F test/orderby4.test 4d39bfbaaa3ae64d026ca2ff166353d2edca4ba4
|
F test/orderby4.test 4d39bfbaaa3ae64d026ca2ff166353d2edca4ba4
|
||||||
F test/orderby5.test 02eca502a0f97c77ce383b0dfa17e99c6a107b8d
|
F test/orderby5.test 02eca502a0f97c77ce383b0dfa17e99c6a107b8d
|
||||||
F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3
|
F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3
|
||||||
F test/pager1.test 16b649c8f0b38d446acbcff8a7bf055a9be43276
|
F test/pager1.test 1acbdb14c5952a72dd43129cabdbf69aaa3ed1fa
|
||||||
F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
|
F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
|
||||||
F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f
|
F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f
|
||||||
F test/pagerfault.test 7285379906ab2f1108b8e82bbdf2d386cc8ff3ff
|
F test/pagerfault.test 7285379906ab2f1108b8e82bbdf2d386cc8ff3ff
|
||||||
@ -749,11 +749,11 @@ F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
|
|||||||
F test/releasetest.mk 2eced2f9ae701fd0a29e714a241760503ccba25a
|
F test/releasetest.mk 2eced2f9ae701fd0a29e714a241760503ccba25a
|
||||||
F test/releasetest.tcl 06d289d8255794073a58d2850742f627924545ce
|
F test/releasetest.tcl 06d289d8255794073a58d2850742f627924545ce
|
||||||
F test/resolver01.test 33abf37ff8335e6bf98f2b45a0af3e06996ccd9a
|
F test/resolver01.test 33abf37ff8335e6bf98f2b45a0af3e06996ccd9a
|
||||||
F test/rollback.test a1b4784b864331eae8b2a98c189efa2a8b11ff07
|
F test/rollback.test e9504a009a202c3ed711da2e6879ff60c5a4669c
|
||||||
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
|
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
|
||||||
F test/rowid.test f777404492adb0e00868fd706a3721328fd3af48
|
F test/rowid.test f777404492adb0e00868fd706a3721328fd3af48
|
||||||
F test/rtree.test 0c8d9dd458d6824e59683c19ab2ffa9ef946f798
|
F test/rtree.test 0c8d9dd458d6824e59683c19ab2ffa9ef946f798
|
||||||
F test/savepoint.test e04f1ca181b706310af944146df39e2bed03cdd5
|
F test/savepoint.test 6c53f76dffe5df0dd87646efe3e7aa159c36e07b
|
||||||
F test/savepoint2.test 9b8543940572a2f01a18298c3135ad0c9f4f67d7
|
F test/savepoint2.test 9b8543940572a2f01a18298c3135ad0c9f4f67d7
|
||||||
F test/savepoint3.test e328085853b14898d78ceea00dfe7db18bb6a9ec
|
F test/savepoint3.test e328085853b14898d78ceea00dfe7db18bb6a9ec
|
||||||
F test/savepoint4.test c8f8159ade6d2acd9128be61e1230f1c1edc6cc0
|
F test/savepoint4.test c8f8159ade6d2acd9128be61e1230f1c1edc6cc0
|
||||||
@ -764,7 +764,7 @@ F test/schema.test 8f7999be894260f151adf15c2c7540f1c6d6a481
|
|||||||
F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5
|
F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5
|
||||||
F test/schema3.test 1bc1008e1f8cb5654b248c55f27249366eb7ed38
|
F test/schema3.test 1bc1008e1f8cb5654b248c55f27249366eb7ed38
|
||||||
F test/schema4.test e6a66e20cc69f0e306667c08be7fda3d11707dc5
|
F test/schema4.test e6a66e20cc69f0e306667c08be7fda3d11707dc5
|
||||||
F test/schema5.test 9ef976783eb3d9a612aacb75690bb45975ffa812
|
F test/schema5.test 29699b4421f183c8f0e88bd28ce7d75d13ea653e
|
||||||
F test/securedel.test 87a2561151af1f1e349071a89fdd77059f50113c
|
F test/securedel.test 87a2561151af1f1e349071a89fdd77059f50113c
|
||||||
F test/securedel2.test 2d54c28e46eb1fd6902089958b20b1b056c6f1c5
|
F test/securedel2.test 2d54c28e46eb1fd6902089958b20b1b056c6f1c5
|
||||||
F test/select1.test fc2a61f226a649393664ad54bc5376631801517c
|
F test/select1.test fc2a61f226a649393664ad54bc5376631801517c
|
||||||
@ -824,7 +824,7 @@ F test/superlock.test 1cde669f68d2dd37d6c9bd35eee1d95491ae3fc2
|
|||||||
F test/sync.test a34cd43e98b7fb84eabbf38f7ed8f7349b3f3d85
|
F test/sync.test a34cd43e98b7fb84eabbf38f7ed8f7349b3f3d85
|
||||||
F test/syscall.test a653783d985108c4912cc64d341ffbbb55ad2806
|
F test/syscall.test a653783d985108c4912cc64d341ffbbb55ad2806
|
||||||
F test/sysfault.test fa776e60bf46bdd3ae69f0b73e46ee3977a58ae6
|
F test/sysfault.test fa776e60bf46bdd3ae69f0b73e46ee3977a58ae6
|
||||||
F test/table.test 30423211108121884588d24d6776c7f38702ad7b
|
F test/table.test 580d23530187026d4502fae74a490f0408cf2cc7
|
||||||
F test/tableapi.test 2674633fa95d80da917571ebdd759a14d9819126
|
F test/tableapi.test 2674633fa95d80da917571ebdd759a14d9819126
|
||||||
F test/tableopts.test 2950f094a984c8aa53493598bf0a07ac7549eb02
|
F test/tableopts.test 2950f094a984c8aa53493598bf0a07ac7549eb02
|
||||||
F test/tclsqlite.test 37a61c2da7e3bfe3b8c1a2867199f6b860df5d43
|
F test/tclsqlite.test 37a61c2da7e3bfe3b8c1a2867199f6b860df5d43
|
||||||
@ -855,7 +855,7 @@ F test/tkt-38cb5df375.test f3cc8671f1eb604d4ae9cf886ed4366bec656678
|
|||||||
F test/tkt-3998683a16.test 6d1d04d551ed1704eb3396ca87bb9ccc8c5c1eb7
|
F test/tkt-3998683a16.test 6d1d04d551ed1704eb3396ca87bb9ccc8c5c1eb7
|
||||||
F test/tkt-3a77c9714e.test b08bca26de1140bdf004a37716582a43d7bd8be8
|
F test/tkt-3a77c9714e.test b08bca26de1140bdf004a37716582a43d7bd8be8
|
||||||
F test/tkt-3fe897352e.test 27e26eb0f1811aeba4d65aba43a4c52e99da5e70
|
F test/tkt-3fe897352e.test 27e26eb0f1811aeba4d65aba43a4c52e99da5e70
|
||||||
F test/tkt-4a03edc4c8.test 2865e4edbc075b954daa82f8da7cc973033ec76e
|
F test/tkt-4a03edc4c8.test 91c0e135888cdc3d4eea82406a44b05c8c1648d0
|
||||||
F test/tkt-4dd95f6943.test 3d0ce415d2ee15d3d564121960016b9c7be79407
|
F test/tkt-4dd95f6943.test 3d0ce415d2ee15d3d564121960016b9c7be79407
|
||||||
F test/tkt-54844eea3f.test a12b851128f46a695e4e378cca67409b9b8f5894
|
F test/tkt-54844eea3f.test a12b851128f46a695e4e378cca67409b9b8f5894
|
||||||
F test/tkt-5d863f876e.test c9f36ca503fa154a3655f92a69d2c30da1747bfa
|
F test/tkt-5d863f876e.test c9f36ca503fa154a3655f92a69d2c30da1747bfa
|
||||||
@ -863,7 +863,7 @@ F test/tkt-5e10420e8d.test 904d1687b3c06d43e5b3555bbcf6802e7c0ffd84
|
|||||||
F test/tkt-5ee23731f.test 9db6e1d7209dc0794948b260d6f82b2b1de83a9f
|
F test/tkt-5ee23731f.test 9db6e1d7209dc0794948b260d6f82b2b1de83a9f
|
||||||
F test/tkt-6bfb98dfc0.test 24780633627b5cfc0635a5500c2389ebfb563336
|
F test/tkt-6bfb98dfc0.test 24780633627b5cfc0635a5500c2389ebfb563336
|
||||||
F test/tkt-752e1646fc.test ea78d88d14fe9866bdd991c634483334639e13bf
|
F test/tkt-752e1646fc.test ea78d88d14fe9866bdd991c634483334639e13bf
|
||||||
F test/tkt-78e04e52ea.test b0190d3375cf88b97d32188149cc99ccf22f556b
|
F test/tkt-78e04e52ea.test 813779f8888f3ca226df656c4eef078f9635f3c9
|
||||||
F test/tkt-7a31705a7e6.test e75a2bba4eec801b92c8040eb22096ac6d35e844
|
F test/tkt-7a31705a7e6.test e75a2bba4eec801b92c8040eb22096ac6d35e844
|
||||||
F test/tkt-7bbfb7d442.test 7b2cd79c7a17ae6750e75ec1a7846712a69c9d18
|
F test/tkt-7bbfb7d442.test 7b2cd79c7a17ae6750e75ec1a7846712a69c9d18
|
||||||
F test/tkt-80ba201079.test 105a721e6aad0ae3c5946d7615d1e4d03f6145b8
|
F test/tkt-80ba201079.test 105a721e6aad0ae3c5946d7615d1e4d03f6145b8
|
||||||
@ -875,7 +875,7 @@ F test/tkt-94c04eaadb.test fa9c71192f7e2ea2d51bf078bc34e8da6088bf71
|
|||||||
F test/tkt-9d68c883.test 458f7d82a523d7644b54b497c986378a7d8c8b67
|
F test/tkt-9d68c883.test 458f7d82a523d7644b54b497c986378a7d8c8b67
|
||||||
F test/tkt-9f2eb3abac.test 85bc63e749f050e6a61c8f9207f1eee65c9d3395
|
F test/tkt-9f2eb3abac.test 85bc63e749f050e6a61c8f9207f1eee65c9d3395
|
||||||
F test/tkt-a7b7803e.test 159ef554234fa1f9fb318c751b284bd1cf858da4
|
F test/tkt-a7b7803e.test 159ef554234fa1f9fb318c751b284bd1cf858da4
|
||||||
F test/tkt-b1d3a2e531.test 610ef582413171b379652663111b1f996d9f8f78
|
F test/tkt-b1d3a2e531.test 8f7576e41ca179289ee1a8fee28386fd8e4b0550
|
||||||
F test/tkt-b351d95f9.test d14a503c414c5c58fdde3e80f9a3cfef986498c0
|
F test/tkt-b351d95f9.test d14a503c414c5c58fdde3e80f9a3cfef986498c0
|
||||||
F test/tkt-b72787b1.test a95e8cdad0b98af1853ac7f0afd4ab27b77bf5f3
|
F test/tkt-b72787b1.test a95e8cdad0b98af1853ac7f0afd4ab27b77bf5f3
|
||||||
F test/tkt-bd484a090c.test 60460bf946f79a79712b71f202eda501ca99b898
|
F test/tkt-bd484a090c.test 60460bf946f79a79712b71f202eda501ca99b898
|
||||||
@ -902,7 +902,7 @@ F test/tkt1512.test a1df1f66caf0b9122d6220c15dcee230298c2c2f
|
|||||||
F test/tkt1514.test ddef38e34fea72eb1ab935ded9f17a3fb71dd9df
|
F test/tkt1514.test ddef38e34fea72eb1ab935ded9f17a3fb71dd9df
|
||||||
F test/tkt1536.test 83ff7a7b6e248016f8d682d4f7a4ae114070d466
|
F test/tkt1536.test 83ff7a7b6e248016f8d682d4f7a4ae114070d466
|
||||||
F test/tkt1537.test e3a14332de9770be8ff14bd15c19a49cbec10808
|
F test/tkt1537.test e3a14332de9770be8ff14bd15c19a49cbec10808
|
||||||
F test/tkt1567.test 80e7144f828b4959bc50b0bba47bf3eb87dbba10
|
F test/tkt1567.test 52f329386ac77e59260d4af1c58490d61377db20
|
||||||
F test/tkt1644.test 80b6a2bb17885f3cf1cb886d97cdad13232bb869
|
F test/tkt1644.test 80b6a2bb17885f3cf1cb886d97cdad13232bb869
|
||||||
F test/tkt1667.test 4700d931ed19ea3983e8e703becb28079250b460
|
F test/tkt1667.test 4700d931ed19ea3983e8e703becb28079250b460
|
||||||
F test/tkt1873.test 0e1b8c023050a430c2525179ed4022ddc7c31264
|
F test/tkt1873.test 0e1b8c023050a430c2525179ed4022ddc7c31264
|
||||||
@ -950,7 +950,7 @@ F test/tkt3527.test 1a6a48441b560bdc53aec581a868eb576234874d
|
|||||||
F test/tkt3541.test 5dc257bde9bc833ab9cc6844bf170b998dbb950a
|
F test/tkt3541.test 5dc257bde9bc833ab9cc6844bf170b998dbb950a
|
||||||
F test/tkt3554.test f599967f279077bace39220cbe76085c7b423725
|
F test/tkt3554.test f599967f279077bace39220cbe76085c7b423725
|
||||||
F test/tkt3581.test 1966b7193f1e3f14951cce8c66907ae69454e9a3
|
F test/tkt3581.test 1966b7193f1e3f14951cce8c66907ae69454e9a3
|
||||||
F test/tkt35xx.test 69d038ce5898f1b64f2084b780bbab1cf9be0a25
|
F test/tkt35xx.test f38c1b03713179d414969187c941466e44945b35
|
||||||
F test/tkt3630.test 929f64852103054125200bc825c316d5f75d42f7
|
F test/tkt3630.test 929f64852103054125200bc825c316d5f75d42f7
|
||||||
F test/tkt3718.test 3b59dcb5c4e7754dacd91e7fd353a61492cc402a
|
F test/tkt3718.test 3b59dcb5c4e7754dacd91e7fd353a61492cc402a
|
||||||
F test/tkt3731.test 0c5f4cbffe102d43c3b2188af91a9e36348f974b
|
F test/tkt3731.test 0c5f4cbffe102d43c3b2188af91a9e36348f974b
|
||||||
@ -984,7 +984,7 @@ F test/trans2.test d5337e61de45e66b1fcbf9db833fa8c82e624b22
|
|||||||
F test/trans3.test 373ac5183cc56be69f48ae44090e7f672939f732
|
F test/trans3.test 373ac5183cc56be69f48ae44090e7f672939f732
|
||||||
F test/transitive1.test 03f532954f46cdf5608f7766bff0b0c52bf2a7cd
|
F test/transitive1.test 03f532954f46cdf5608f7766bff0b0c52bf2a7cd
|
||||||
F test/trigger1.test dc47573ac79ffe0ee3eecaa517d70d8dacbccd03
|
F test/trigger1.test dc47573ac79ffe0ee3eecaa517d70d8dacbccd03
|
||||||
F test/trigger2.test 1996d775f4370044b8414505477f632e1fa24376
|
F test/trigger2.test 5cd7d69a7ba1143ee045e4ae2963ff32ae4c87a6
|
||||||
F test/trigger3.test aa640bb2bbb03edd5ff69c055117ea088f121945
|
F test/trigger3.test aa640bb2bbb03edd5ff69c055117ea088f121945
|
||||||
F test/trigger4.test 74700b76ebf3947b2f7a92405141eb2cf2a5d359
|
F test/trigger4.test 74700b76ebf3947b2f7a92405141eb2cf2a5d359
|
||||||
F test/trigger5.test 619391a3e9fc194081d22cefd830d811e7badf83
|
F test/trigger5.test 619391a3e9fc194081d22cefd830d811e7badf83
|
||||||
@ -994,17 +994,17 @@ F test/trigger8.test 30cb0530bd7c4728055420e3f739aa00412eafa4
|
|||||||
F test/trigger9.test 5b0789f1c5c4600961f8e68511b825b87be53e31
|
F test/trigger9.test 5b0789f1c5c4600961f8e68511b825b87be53e31
|
||||||
F test/triggerA.test fe5597f47ee21bacb4936dc827994ed94161e332
|
F test/triggerA.test fe5597f47ee21bacb4936dc827994ed94161e332
|
||||||
F test/triggerB.test 56780c031b454abac2340dbb3b71ac5c56c3d7fe
|
F test/triggerB.test 56780c031b454abac2340dbb3b71ac5c56c3d7fe
|
||||||
F test/triggerC.test a7b4367392c755bc5fd5fff88011753e6b6afe90
|
F test/triggerC.test a68980c5955d62ee24be6f97129d824f199f9a4c
|
||||||
F test/triggerD.test 8e7f3921a92a5797d472732108109e44575fa650
|
F test/triggerD.test 8e7f3921a92a5797d472732108109e44575fa650
|
||||||
F test/triggerE.test 355e9c5cbaed5cd039a60baad1fb2197caeb8e52
|
F test/triggerE.test 355e9c5cbaed5cd039a60baad1fb2197caeb8e52
|
||||||
F test/tt3_checkpoint.c 415eccce672d681b297485fc20f44cdf0eac93af
|
F test/tt3_checkpoint.c 415eccce672d681b297485fc20f44cdf0eac93af
|
||||||
F test/types.test bf816ce73c7dfcfe26b700c19f97ef4050d194ff
|
F test/types.test bf816ce73c7dfcfe26b700c19f97ef4050d194ff
|
||||||
F test/types2.test 3555aacf8ed8dc883356e59efc314707e6247a84
|
F test/types2.test 3555aacf8ed8dc883356e59efc314707e6247a84
|
||||||
F test/types3.test 99e009491a54f4dc02c06bdbc0c5eea56ae3e25a
|
F test/types3.test 99e009491a54f4dc02c06bdbc0c5eea56ae3e25a
|
||||||
F test/unique.test 196505faa97f12ca76c1a67f526fc8daf1a74c31
|
F test/unique.test 93f8b2ef5ea51b9495f8d6493429b1fd0f465264
|
||||||
F test/unixexcl.test a9870e46cc6f8390a494513d4f2bf55b5a8b3e46
|
F test/unixexcl.test a9870e46cc6f8390a494513d4f2bf55b5a8b3e46
|
||||||
F test/unordered.test ef85ac8f2f3c93ed2b9e811b684de73175fc464c
|
F test/unordered.test ef85ac8f2f3c93ed2b9e811b684de73175fc464c
|
||||||
F test/update.test 8bc86fd7ef1a00014f76dc6a6a7c974df4aef172
|
F test/update.test 1b6c488a8f993d090b7ee9ad0e234faa161b3aeb
|
||||||
F test/uri.test 63e03df051620a18f794b4f4adcdefb3c23b6751
|
F test/uri.test 63e03df051620a18f794b4f4adcdefb3c23b6751
|
||||||
F test/utf16align.test 54cd35a27c005a9b6e7815d887718780b6a462ae
|
F test/utf16align.test 54cd35a27c005a9b6e7815d887718780b6a462ae
|
||||||
F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
|
F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
|
||||||
@ -1014,7 +1014,7 @@ F test/vacuum4.test d3f8ecff345f166911568f397d2432c16d2867d9
|
|||||||
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
|
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
|
||||||
F test/veryquick.test 57ab846bacf7b90cf4e9a672721ea5c5b669b661
|
F test/veryquick.test 57ab846bacf7b90cf4e9a672721ea5c5b669b661
|
||||||
F test/view.test 4057630287bfa5955628fe90a13d4c225d1c7352
|
F test/view.test 4057630287bfa5955628fe90a13d4c225d1c7352
|
||||||
F test/vtab1.test 1550abf90bc2b996f8c34e0be3fdb251af54fa41
|
F test/vtab1.test 45ddde57764659c0ec90874bcb6c4831f1004c06
|
||||||
F test/vtab2.test 7bcffc050da5c68f4f312e49e443063e2d391c0d
|
F test/vtab2.test 7bcffc050da5c68f4f312e49e443063e2d391c0d
|
||||||
F test/vtab3.test baad99fd27217f5d6db10660522e0b7192446de1
|
F test/vtab3.test baad99fd27217f5d6db10660522e0b7192446de1
|
||||||
F test/vtab4.test 942f8b8280b3ea8a41dae20e7822d065ca1cb275
|
F test/vtab4.test 942f8b8280b3ea8a41dae20e7822d065ca1cb275
|
||||||
@ -1032,7 +1032,7 @@ F test/vtabF.test fd5ad376f5a34fe0891df1f3cddb4fe7c3eb077e
|
|||||||
F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
|
F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
|
||||||
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
|
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
|
||||||
F test/vtab_shared.test 82f463886e18d7f8395a4b6167c91815efe54839
|
F test/vtab_shared.test 82f463886e18d7f8395a4b6167c91815efe54839
|
||||||
F test/wal.test 3a6ebdf0287b38b5537c07c517b30dda9aaac317
|
F test/wal.test a59d00eaa0901e42b8a2ef21f2a4c972ee1f1bd4
|
||||||
F test/wal2.test d4b470f13c87f6d8268b004380afa04c3c67cb90
|
F test/wal2.test d4b470f13c87f6d8268b004380afa04c3c67cb90
|
||||||
F test/wal3.test b22eb662bcbc148c5f6d956eaf94b047f7afe9c0
|
F test/wal3.test b22eb662bcbc148c5f6d956eaf94b047f7afe9c0
|
||||||
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
|
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
|
||||||
@ -1078,10 +1078,10 @@ F test/wherelimit.test 5e9fd41e79bb2b2d588ed999d641d9c965619b31
|
|||||||
F test/wild001.test bca33f499866f04c24510d74baf1e578d4e44b1c
|
F test/wild001.test bca33f499866f04c24510d74baf1e578d4e44b1c
|
||||||
F test/win32lock.test 7a6bd73a5dcdee39b5bb93e92395e1773a194361
|
F test/win32lock.test 7a6bd73a5dcdee39b5bb93e92395e1773a194361
|
||||||
F test/win32longpath.test e2aafc07e6990fe86c69be22a3d1a0e210cd329b
|
F test/win32longpath.test e2aafc07e6990fe86c69be22a3d1a0e210cd329b
|
||||||
F test/without_rowid1.test 80f14d449a810eb33eb4735e75189c17a94910a5
|
F test/without_rowid1.test 657fde6092752c0f08a8f4b5f92b8b4b11c754ce
|
||||||
F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99
|
F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99
|
||||||
F test/without_rowid3.test fb9835ccccf50a9d45295206a9c3f6baaf114d55
|
F test/without_rowid3.test eac3d5c8a1924725b58503a368f2cbd24fd6c8a0
|
||||||
F test/without_rowid4.test 27594b4b47880042532afba0153dda7dc64cef9c
|
F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a
|
||||||
F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688
|
F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688
|
||||||
F test/zerodamage.test 209d7ed441f44cc5299e4ebffbef06fd5aabfefd
|
F test/zerodamage.test 209d7ed441f44cc5299e4ebffbef06fd5aabfefd
|
||||||
F tool/build-all-msvc.bat 1bac6adc3fdb4d9204f21d17b14be25778370e48 x
|
F tool/build-all-msvc.bat 1bac6adc3fdb4d9204f21d17b14be25778370e48 x
|
||||||
@ -1133,7 +1133,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
||||||
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
|
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
|
||||||
P 79befe3ac1f676272b78423b9aa5dac41435420e
|
P 294ed33756b06375e56c41f1088d42ee48adbdc8
|
||||||
R 766c023e71cd0186fc0f56e56f90b7bf
|
R 130b6461e81d8eeec1daafa19f71d1d2
|
||||||
U drh
|
U drh
|
||||||
Z e7978228c6b42136e19f0b3015aa0577
|
Z ecfd4293f10f89cf27ac30e16c93be55
|
||||||
|
@ -1 +1 @@
|
|||||||
294ed33756b06375e56c41f1088d42ee48adbdc8
|
54b221929744b1bcdbcc2030fef2e510618afd41
|
60
src/build.c
60
src/build.c
@ -2683,9 +2683,7 @@ static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
|
|||||||
addr2 = sqlite3VdbeCurrentAddr(v);
|
addr2 = sqlite3VdbeCurrentAddr(v);
|
||||||
sqlite3VdbeAddOp4Int(v, OP_SorterCompare, iSorter, j2, regRecord,
|
sqlite3VdbeAddOp4Int(v, OP_SorterCompare, iSorter, j2, regRecord,
|
||||||
pKey->nField - pIndex->nKeyCol);
|
pKey->nField - pIndex->nKeyCol);
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_UNIQUE,
|
sqlite3UniqueConstraint(pParse, OE_Abort, pIndex);
|
||||||
OE_Abort, "indexed columns are not unique", P4_STATIC
|
|
||||||
);
|
|
||||||
}else{
|
}else{
|
||||||
addr2 = sqlite3VdbeCurrentAddr(v);
|
addr2 = sqlite3VdbeCurrentAddr(v);
|
||||||
}
|
}
|
||||||
@ -3949,7 +3947,8 @@ void sqlite3HaltConstraint(
|
|||||||
int errCode, /* extended error code */
|
int errCode, /* extended error code */
|
||||||
int onError, /* Constraint type */
|
int onError, /* Constraint type */
|
||||||
char *p4, /* Error message */
|
char *p4, /* Error message */
|
||||||
int p4type /* P4_STATIC or P4_TRANSIENT */
|
i8 p4type, /* P4_STATIC or P4_TRANSIENT */
|
||||||
|
u8 p5Errmsg /* P5_ErrMsg type */
|
||||||
){
|
){
|
||||||
Vdbe *v = sqlite3GetVdbe(pParse);
|
Vdbe *v = sqlite3GetVdbe(pParse);
|
||||||
assert( (errCode&0xff)==SQLITE_CONSTRAINT );
|
assert( (errCode&0xff)==SQLITE_CONSTRAINT );
|
||||||
@ -3957,6 +3956,59 @@ void sqlite3HaltConstraint(
|
|||||||
sqlite3MayAbort(pParse);
|
sqlite3MayAbort(pParse);
|
||||||
}
|
}
|
||||||
sqlite3VdbeAddOp4(v, OP_Halt, errCode, onError, 0, p4, p4type);
|
sqlite3VdbeAddOp4(v, OP_Halt, errCode, onError, 0, p4, p4type);
|
||||||
|
if( p5Errmsg ) sqlite3VdbeChangeP5(v, p5Errmsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Code an OP_Halt due to UNIQUE or PRIMARY KEY constraint violation.
|
||||||
|
*/
|
||||||
|
void sqlite3UniqueConstraint(
|
||||||
|
Parse *pParse, /* Parsing context */
|
||||||
|
int onError, /* Constraint type */
|
||||||
|
Index *pIdx /* The index that triggers the constraint */
|
||||||
|
){
|
||||||
|
char *zErr;
|
||||||
|
int j;
|
||||||
|
StrAccum errMsg;
|
||||||
|
Table *pTab = pIdx->pTable;
|
||||||
|
|
||||||
|
sqlite3StrAccumInit(&errMsg, 0, 0, 200);
|
||||||
|
errMsg.db = pParse->db;
|
||||||
|
for(j=0; j<pIdx->nKeyCol; j++){
|
||||||
|
char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
|
||||||
|
if( j ) sqlite3StrAccumAppend(&errMsg, ", ", 2);
|
||||||
|
sqlite3StrAccumAppend(&errMsg, pTab->zName, -1);
|
||||||
|
sqlite3StrAccumAppend(&errMsg, ".", 1);
|
||||||
|
sqlite3StrAccumAppend(&errMsg, zCol, -1);
|
||||||
|
}
|
||||||
|
zErr = sqlite3StrAccumFinish(&errMsg);
|
||||||
|
sqlite3HaltConstraint(pParse,
|
||||||
|
(pIdx->autoIndex==2)?SQLITE_CONSTRAINT_PRIMARYKEY:SQLITE_CONSTRAINT_UNIQUE,
|
||||||
|
onError, zErr, 0, P5_ConstraintUnique);
|
||||||
|
sqlite3DbFree(errMsg.db, zErr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Code an OP_Halt due to non-unique rowid.
|
||||||
|
*/
|
||||||
|
void sqlite3RowidConstraint(
|
||||||
|
Parse *pParse, /* Parsing context */
|
||||||
|
int onError, /* Conflict resolution algorithm */
|
||||||
|
Table *pTab /* The table with the non-unique rowid */
|
||||||
|
){
|
||||||
|
char *zMsg;
|
||||||
|
int rc;
|
||||||
|
if( pTab->iPKey>=0 ){
|
||||||
|
zMsg = sqlite3MPrintf(pParse->db, "%s.%s", pTab->zName,
|
||||||
|
pTab->aCol[pTab->iPKey].zName);
|
||||||
|
rc = SQLITE_CONSTRAINT_PRIMARYKEY;
|
||||||
|
}else{
|
||||||
|
zMsg = sqlite3MPrintf(pParse->db, "%s.rowid", pTab->zName);
|
||||||
|
rc = SQLITE_CONSTRAINT_ROWID;
|
||||||
|
}
|
||||||
|
sqlite3HaltConstraint(pParse, rc, onError, zMsg, P4_DYNAMIC,
|
||||||
|
P5_ConstraintUnique);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2972,7 +2972,7 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
|
|||||||
v, OP_Halt, SQLITE_OK, OE_Ignore, 0, pExpr->u.zToken,0);
|
v, OP_Halt, SQLITE_OK, OE_Ignore, 0, pExpr->u.zToken,0);
|
||||||
}else{
|
}else{
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_TRIGGER,
|
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_TRIGGER,
|
||||||
pExpr->affinity, pExpr->u.zToken, 0);
|
pExpr->affinity, pExpr->u.zToken, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
12
src/fkey.c
12
src/fkey.c
@ -432,8 +432,7 @@ static void fkLookupParent(
|
|||||||
** generated for will not open a statement transaction. */
|
** generated for will not open a statement transaction. */
|
||||||
assert( nIncr==1 );
|
assert( nIncr==1 );
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,
|
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,
|
||||||
OE_Abort, "foreign key constraint failed", P4_STATIC
|
OE_Abort, 0, P4_STATIC, P5_ConstraintFK);
|
||||||
);
|
|
||||||
}else{
|
}else{
|
||||||
if( nIncr>0 && pFKey->isDeferred==0 ){
|
if( nIncr>0 && pFKey->isDeferred==0 ){
|
||||||
sqlite3ParseToplevel(pParse)->mayAbort = 1;
|
sqlite3ParseToplevel(pParse)->mayAbort = 1;
|
||||||
@ -516,13 +515,13 @@ static Expr *exprTableColumn(
|
|||||||
** --------------------------------------------------------------------------
|
** --------------------------------------------------------------------------
|
||||||
** DELETE immediate Increment the "immediate constraint counter".
|
** DELETE immediate Increment the "immediate constraint counter".
|
||||||
** Or, if the ON (UPDATE|DELETE) action is RESTRICT,
|
** Or, if the ON (UPDATE|DELETE) action is RESTRICT,
|
||||||
** throw a "foreign key constraint failed" exception.
|
** throw a "FOREIGN KEY constraint failed" exception.
|
||||||
**
|
**
|
||||||
** INSERT immediate Decrement the "immediate constraint counter".
|
** INSERT immediate Decrement the "immediate constraint counter".
|
||||||
**
|
**
|
||||||
** DELETE deferred Increment the "deferred constraint counter".
|
** DELETE deferred Increment the "deferred constraint counter".
|
||||||
** Or, if the ON (UPDATE|DELETE) action is RESTRICT,
|
** Or, if the ON (UPDATE|DELETE) action is RESTRICT,
|
||||||
** throw a "foreign key constraint failed" exception.
|
** throw a "FOREIGN KEY constraint failed" exception.
|
||||||
**
|
**
|
||||||
** INSERT deferred Decrement the "deferred constraint counter".
|
** INSERT deferred Decrement the "deferred constraint counter".
|
||||||
**
|
**
|
||||||
@ -734,8 +733,7 @@ void sqlite3FkDropTable(Parse *pParse, SrcList *pName, Table *pTab){
|
|||||||
if( (db->flags & SQLITE_DeferFKs)==0 ){
|
if( (db->flags & SQLITE_DeferFKs)==0 ){
|
||||||
sqlite3VdbeAddOp2(v, OP_FkIfZero, 0, sqlite3VdbeCurrentAddr(v)+2);
|
sqlite3VdbeAddOp2(v, OP_FkIfZero, 0, sqlite3VdbeCurrentAddr(v)+2);
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,
|
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,
|
||||||
OE_Abort, "foreign key constraint failed", P4_STATIC
|
OE_Abort, 0, P4_STATIC, P5_ConstraintFK);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( iSkip ){
|
if( iSkip ){
|
||||||
@ -1213,7 +1211,7 @@ static Trigger *fkActionTrigger(
|
|||||||
|
|
||||||
tFrom.z = zFrom;
|
tFrom.z = zFrom;
|
||||||
tFrom.n = nFrom;
|
tFrom.n = nFrom;
|
||||||
pRaise = sqlite3Expr(db, TK_RAISE, "foreign key constraint failed");
|
pRaise = sqlite3Expr(db, TK_RAISE, "FOREIGN KEY constraint failed");
|
||||||
if( pRaise ){
|
if( pRaise ){
|
||||||
pRaise->affinity = OE_Abort;
|
pRaise->affinity = OE_Abort;
|
||||||
}
|
}
|
||||||
|
54
src/insert.c
54
src/insert.c
@ -1278,12 +1278,11 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
/* Fall through */
|
/* Fall through */
|
||||||
case OE_Rollback:
|
case OE_Rollback:
|
||||||
case OE_Fail: {
|
case OE_Fail: {
|
||||||
char *zMsg;
|
char *zMsg = sqlite3MPrintf(db, "%s.%s", pTab->zName,
|
||||||
sqlite3VdbeAddOp3(v, OP_HaltIfNull,
|
pTab->aCol[i].zName);
|
||||||
SQLITE_CONSTRAINT_NOTNULL, onError, regNewData+1+i);
|
sqlite3VdbeAddOp4(v, OP_HaltIfNull, SQLITE_CONSTRAINT_NOTNULL, onError,
|
||||||
zMsg = sqlite3MPrintf(db, "%s.%s may not be NULL",
|
regNewData+1+i, zMsg, P4_DYNAMIC);
|
||||||
pTab->zName, pTab->aCol[i].zName);
|
sqlite3VdbeChangeP5(v, P5_ConstraintNotNull);
|
||||||
sqlite3VdbeChangeP4(v, -1, zMsg, P4_DYNAMIC);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OE_Ignore: {
|
case OE_Ignore: {
|
||||||
@ -1313,15 +1312,12 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
if( onError==OE_Ignore ){
|
if( onError==OE_Ignore ){
|
||||||
sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
|
sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
|
||||||
}else{
|
}else{
|
||||||
char *zConsName = pCheck->a[i].zName;
|
char *zName = pCheck->a[i].zName;
|
||||||
|
if( zName==0 ) zName = pTab->zName;
|
||||||
if( onError==OE_Replace ) onError = OE_Abort; /* IMP: R-15569-63625 */
|
if( onError==OE_Replace ) onError = OE_Abort; /* IMP: R-15569-63625 */
|
||||||
if( zConsName ){
|
|
||||||
zConsName = sqlite3MPrintf(db, "constraint %s failed", zConsName);
|
|
||||||
}else{
|
|
||||||
zConsName = 0;
|
|
||||||
}
|
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_CHECK,
|
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_CHECK,
|
||||||
onError, zConsName, P4_DYNAMIC);
|
onError, zName, P4_TRANSIENT,
|
||||||
|
P5_ConstraintCheck);
|
||||||
}
|
}
|
||||||
sqlite3VdbeResolveLabel(v, allOk);
|
sqlite3VdbeResolveLabel(v, allOk);
|
||||||
}
|
}
|
||||||
@ -1362,8 +1358,7 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
case OE_Rollback:
|
case OE_Rollback:
|
||||||
case OE_Abort:
|
case OE_Abort:
|
||||||
case OE_Fail: {
|
case OE_Fail: {
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_PRIMARYKEY,
|
sqlite3RowidConstraint(pParse, onError, pTab);
|
||||||
onError, "PRIMARY KEY must be unique", P4_STATIC);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OE_Replace: {
|
case OE_Replace: {
|
||||||
@ -1546,31 +1541,7 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
case OE_Rollback:
|
case OE_Rollback:
|
||||||
case OE_Abort:
|
case OE_Abort:
|
||||||
case OE_Fail: {
|
case OE_Fail: {
|
||||||
if( pIdx->autoIndex==2 ){
|
sqlite3UniqueConstraint(pParse, onError, pIdx);
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_PRIMARYKEY,
|
|
||||||
onError, "PRIMARY KEY must be unique", 0);
|
|
||||||
}else{
|
|
||||||
int j;
|
|
||||||
StrAccum errMsg;
|
|
||||||
const char *zSep;
|
|
||||||
char *zErr;
|
|
||||||
|
|
||||||
sqlite3StrAccumInit(&errMsg, 0, 0, 200);
|
|
||||||
errMsg.db = db;
|
|
||||||
zSep = pIdx->nKeyCol>1 ? "columns " : "column ";
|
|
||||||
for(j=0; j<pIdx->nKeyCol; j++){
|
|
||||||
char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
|
|
||||||
sqlite3StrAccumAppend(&errMsg, zSep, -1);
|
|
||||||
zSep = ", ";
|
|
||||||
sqlite3StrAccumAppend(&errMsg, zCol, -1);
|
|
||||||
}
|
|
||||||
sqlite3StrAccumAppend(&errMsg,
|
|
||||||
pIdx->nKeyCol>1 ? " are not unique" : " is not unique", -1);
|
|
||||||
zErr = sqlite3StrAccumFinish(&errMsg);
|
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_UNIQUE,
|
|
||||||
onError, zErr, 0);
|
|
||||||
sqlite3DbFree(errMsg.db, zErr);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OE_Ignore: {
|
case OE_Ignore: {
|
||||||
@ -2019,8 +1990,7 @@ static int xferOptimization(
|
|||||||
if( pDest->iPKey>=0 ){
|
if( pDest->iPKey>=0 ){
|
||||||
addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
|
addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
|
||||||
addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);
|
addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);
|
||||||
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_PRIMARYKEY,
|
sqlite3RowidConstraint(pParse, onError, pDest);
|
||||||
onError, "PRIMARY KEY must be unique", P4_STATIC);
|
|
||||||
sqlite3VdbeJumpHere(v, addr2);
|
sqlite3VdbeJumpHere(v, addr2);
|
||||||
autoIncStep(pParse, regAutoinc, regRowid);
|
autoIncStep(pParse, regAutoinc, regRowid);
|
||||||
}else if( pDest->pIndex==0 ){
|
}else if( pDest->pIndex==0 ){
|
||||||
|
@ -1135,6 +1135,7 @@ const char *sqlite3ErrName(int rc){
|
|||||||
case SQLITE_CONSTRAINT_VTAB: zName = "SQLITE_CONSTRAINT_VTAB"; break;
|
case SQLITE_CONSTRAINT_VTAB: zName = "SQLITE_CONSTRAINT_VTAB"; break;
|
||||||
case SQLITE_CONSTRAINT_FUNCTION:
|
case SQLITE_CONSTRAINT_FUNCTION:
|
||||||
zName = "SQLITE_CONSTRAINT_FUNCTION"; break;
|
zName = "SQLITE_CONSTRAINT_FUNCTION"; break;
|
||||||
|
case SQLITE_CONSTRAINT_ROWID: zName = "SQLITE_CONSTRAINT_ROWID"; break;
|
||||||
case SQLITE_MISMATCH: zName = "SQLITE_MISMATCH"; break;
|
case SQLITE_MISMATCH: zName = "SQLITE_MISMATCH"; break;
|
||||||
case SQLITE_MISUSE: zName = "SQLITE_MISUSE"; break;
|
case SQLITE_MISUSE: zName = "SQLITE_MISUSE"; break;
|
||||||
case SQLITE_NOLFS: zName = "SQLITE_NOLFS"; break;
|
case SQLITE_NOLFS: zName = "SQLITE_NOLFS"; break;
|
||||||
|
@ -496,6 +496,7 @@ int sqlite3_exec(
|
|||||||
#define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8))
|
#define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8))
|
||||||
#define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8))
|
#define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8))
|
||||||
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8))
|
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8))
|
||||||
|
#define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8))
|
||||||
#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
|
#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
|
||||||
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
|
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
|
||||||
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
|
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
|
||||||
|
@ -2938,7 +2938,9 @@ int sqlite3OpenTableAndIndices(Parse*, Table*, int, int, int*, int*);
|
|||||||
void sqlite3BeginWriteOperation(Parse*, int, int);
|
void sqlite3BeginWriteOperation(Parse*, int, int);
|
||||||
void sqlite3MultiWrite(Parse*);
|
void sqlite3MultiWrite(Parse*);
|
||||||
void sqlite3MayAbort(Parse*);
|
void sqlite3MayAbort(Parse*);
|
||||||
void sqlite3HaltConstraint(Parse*, int, int, char*, int);
|
void sqlite3HaltConstraint(Parse*, int, int, char*, i8, u8);
|
||||||
|
void sqlite3UniqueConstraint(Parse*, int, Index*);
|
||||||
|
void sqlite3RowidConstraint(Parse*, int, Table*);
|
||||||
Expr *sqlite3ExprDup(sqlite3*,Expr*,int);
|
Expr *sqlite3ExprDup(sqlite3*,Expr*,int);
|
||||||
ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);
|
ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);
|
||||||
SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);
|
SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);
|
||||||
|
53
src/vdbe.c
53
src/vdbe.c
@ -804,12 +804,13 @@ case OP_Yield: { /* in1 */
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Opcode: HaltIfNull P1 P2 P3 P4 *
|
/* Opcode: HaltIfNull P1 P2 P3 P4 P5
|
||||||
** Synopsis: if r[P3] null then halt
|
** Synopsis: if r[P3] null then halt
|
||||||
**
|
**
|
||||||
** Check the value in register P3. If it is NULL then Halt using
|
** Check the value in register P3. If it is NULL then Halt using
|
||||||
** parameter P1, P2, and P4 as if this were a Halt instruction. If the
|
** parameter P1, P2, and P4 as if this were a Halt instruction. If the
|
||||||
** value in register P3 is not NULL, then this routine is a no-op.
|
** value in register P3 is not NULL, then this routine is a no-op.
|
||||||
|
** The P5 parameter should be 1.
|
||||||
*/
|
*/
|
||||||
case OP_HaltIfNull: { /* in3 */
|
case OP_HaltIfNull: { /* in3 */
|
||||||
pIn3 = &aMem[pOp->p3];
|
pIn3 = &aMem[pOp->p3];
|
||||||
@ -817,7 +818,7 @@ case OP_HaltIfNull: { /* in3 */
|
|||||||
/* Fall through into OP_Halt */
|
/* Fall through into OP_Halt */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Opcode: Halt P1 P2 * P4 *
|
/* Opcode: Halt P1 P2 * P4 P5
|
||||||
**
|
**
|
||||||
** Exit immediately. All open cursors, etc are closed
|
** Exit immediately. All open cursors, etc are closed
|
||||||
** automatically.
|
** automatically.
|
||||||
@ -832,11 +833,25 @@ case OP_HaltIfNull: { /* in3 */
|
|||||||
**
|
**
|
||||||
** If P4 is not null then it is an error message string.
|
** If P4 is not null then it is an error message string.
|
||||||
**
|
**
|
||||||
|
** P5 is a value between 0 and 4, inclusive, that modifies the P4 string.
|
||||||
|
**
|
||||||
|
** 0: (no change)
|
||||||
|
** 1: NOT NULL contraint failed: P4
|
||||||
|
** 2: UNIQUE constraint failed: P4
|
||||||
|
** 3: CHECK constraint failed: P4
|
||||||
|
** 4: FOREIGN KEY constraint failed: P4
|
||||||
|
**
|
||||||
|
** If P5 is not zero and P4 is NULL, then everything after the ":" is
|
||||||
|
** omitted.
|
||||||
|
**
|
||||||
** There is an implied "Halt 0 0 0" instruction inserted at the very end of
|
** There is an implied "Halt 0 0 0" instruction inserted at the very end of
|
||||||
** every program. So a jump past the last instruction of the program
|
** every program. So a jump past the last instruction of the program
|
||||||
** is the same as executing Halt.
|
** is the same as executing Halt.
|
||||||
*/
|
*/
|
||||||
case OP_Halt: {
|
case OP_Halt: {
|
||||||
|
const char *zType;
|
||||||
|
const char *zLogFmt;
|
||||||
|
|
||||||
if( pOp->p1==SQLITE_OK && p->pFrame ){
|
if( pOp->p1==SQLITE_OK && p->pFrame ){
|
||||||
/* Halt the sub-program. Return control to the parent frame. */
|
/* Halt the sub-program. Return control to the parent frame. */
|
||||||
VdbeFrame *pFrame = p->pFrame;
|
VdbeFrame *pFrame = p->pFrame;
|
||||||
@ -857,18 +872,34 @@ case OP_Halt: {
|
|||||||
aMem = p->aMem;
|
aMem = p->aMem;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if( pOp->p5 ){
|
||||||
|
static const char * const azType[] = { "NOT NULL", "UNIQUE", "CHECK",
|
||||||
|
"FOREIGN KEY" };
|
||||||
|
assert( pOp->p5>=1 && pOp->p5<=4 );
|
||||||
|
testcase( pOp->p5==1 );
|
||||||
|
testcase( pOp->p5==2 );
|
||||||
|
testcase( pOp->p5==3 );
|
||||||
|
testcase( pOp->p5==4 );
|
||||||
|
zType = azType[pOp->p5-1];
|
||||||
|
}else{
|
||||||
|
zType = 0;
|
||||||
|
}
|
||||||
p->rc = pOp->p1;
|
p->rc = pOp->p1;
|
||||||
p->errorAction = (u8)pOp->p2;
|
p->errorAction = (u8)pOp->p2;
|
||||||
p->pc = pc;
|
p->pc = pc;
|
||||||
if( pOp->p4.z ){
|
if( p->rc ){
|
||||||
assert( p->rc!=SQLITE_OK );
|
zLogFmt = "abort at %d in [%s]: %s";
|
||||||
sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z);
|
if( zType && pOp->p4.z ){
|
||||||
testcase( sqlite3GlobalConfig.xLog!=0 );
|
sqlite3SetString(&p->zErrMsg, db, "%s constraint failed: %s",
|
||||||
sqlite3_log(pOp->p1, "abort at %d in [%s]: %s", pc, p->zSql, pOp->p4.z);
|
zType, pOp->p4.z);
|
||||||
}else if( p->rc ){
|
}else if( pOp->p4.z ){
|
||||||
testcase( sqlite3GlobalConfig.xLog!=0 );
|
sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z);
|
||||||
sqlite3_log(pOp->p1, "constraint failed at %d in [%s]", pc, p->zSql);
|
}else if( zType ){
|
||||||
|
sqlite3SetString(&p->zErrMsg, db, "%s constraint failed", zType);
|
||||||
|
}else{
|
||||||
|
zLogFmt = "abort at %d in [%s]";
|
||||||
|
}
|
||||||
|
sqlite3_log(pOp->p1, zLogFmt, pc, p->zSql, p->zErrMsg);
|
||||||
}
|
}
|
||||||
rc = sqlite3VdbeHalt(p);
|
rc = sqlite3VdbeHalt(p);
|
||||||
assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR );
|
assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR );
|
||||||
|
@ -127,6 +127,12 @@ typedef struct VdbeOpList VdbeOpList;
|
|||||||
#define P4_KEYINFO_HANDOFF (-16)
|
#define P4_KEYINFO_HANDOFF (-16)
|
||||||
#define P4_KEYINFO_STATIC (-17)
|
#define P4_KEYINFO_STATIC (-17)
|
||||||
|
|
||||||
|
/* Error message codes for OP_Halt */
|
||||||
|
#define P5_ConstraintNotNull 1
|
||||||
|
#define P5_ConstraintUnique 2
|
||||||
|
#define P5_ConstraintCheck 3
|
||||||
|
#define P5_ConstraintFK 4
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The Vdbe.aColName array contains 5n Mem structures, where n is the
|
** The Vdbe.aColName array contains 5n Mem structures, where n is the
|
||||||
** number of columns of data returned by the statement.
|
** number of columns of data returned by the statement.
|
||||||
|
@ -2198,7 +2198,7 @@ int sqlite3VdbeCheckFk(Vdbe *p, int deferred){
|
|||||||
){
|
){
|
||||||
p->rc = SQLITE_CONSTRAINT_FOREIGNKEY;
|
p->rc = SQLITE_CONSTRAINT_FOREIGNKEY;
|
||||||
p->errorAction = OE_Abort;
|
p->errorAction = OE_Abort;
|
||||||
sqlite3SetString(&p->zErrMsg, db, "foreign key constraint failed");
|
sqlite3SetString(&p->zErrMsg, db, "FOREIGN KEY constraint failed");
|
||||||
return SQLITE_ERROR;
|
return SQLITE_ERROR;
|
||||||
}
|
}
|
||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
|
@ -526,7 +526,7 @@ do_test autovacuum-4.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
CREATE UNIQUE INDEX av1_i ON av1(a);
|
CREATE UNIQUE INDEX av1_i ON av1(a);
|
||||||
}
|
}
|
||||||
} {1 {indexed columns are not unique}}
|
} {1 {UNIQUE constraint failed: av1.a}}
|
||||||
do_test autovacuum-4.3 {
|
do_test autovacuum-4.3 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT sum(a) FROM av1;
|
SELECT sum(a) FROM av1;
|
||||||
|
@ -237,7 +237,7 @@ do_test capi2-3.13b {db changes} {0}
|
|||||||
do_test capi2-3.14 {
|
do_test capi2-3.14 {
|
||||||
list [sqlite3_finalize $VM] [sqlite3_errmsg $DB] \
|
list [sqlite3_finalize $VM] [sqlite3_errmsg $DB] \
|
||||||
[sqlite3_extended_errcode $DB]
|
[sqlite3_extended_errcode $DB]
|
||||||
} {SQLITE_CONSTRAINT {column a is not unique} SQLITE_CONSTRAINT_UNIQUE}
|
} {SQLITE_CONSTRAINT {UNIQUE constraint failed: t1.a} SQLITE_CONSTRAINT_UNIQUE}
|
||||||
do_test capi2-3.15 {
|
do_test capi2-3.15 {
|
||||||
set VM [sqlite3_prepare $DB {CREATE TABLE t2(a NOT NULL, b)} -1 TAIL]
|
set VM [sqlite3_prepare $DB {CREATE TABLE t2(a NOT NULL, b)} -1 TAIL]
|
||||||
set TAIL
|
set TAIL
|
||||||
@ -261,7 +261,7 @@ do_test capi2-3.18 {
|
|||||||
do_test capi2-3.19 {
|
do_test capi2-3.19 {
|
||||||
list [sqlite3_finalize $VM] [sqlite3_errmsg $DB] \
|
list [sqlite3_finalize $VM] [sqlite3_errmsg $DB] \
|
||||||
[sqlite3_extended_errcode $DB]
|
[sqlite3_extended_errcode $DB]
|
||||||
} {SQLITE_CONSTRAINT {t2.a may not be NULL} SQLITE_CONSTRAINT_NOTNULL}
|
} {SQLITE_CONSTRAINT {NOT NULL constraint failed: t2.a} SQLITE_CONSTRAINT_NOTNULL}
|
||||||
|
|
||||||
do_test capi2-3.20 {
|
do_test capi2-3.20 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -555,7 +555,7 @@ do_test capi2-6.27 {
|
|||||||
INSERT INTO t1 VALUES(2,4,5);
|
INSERT INTO t1 VALUES(2,4,5);
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test capi2-6.28 {
|
do_test capi2-6.28 {
|
||||||
list [sqlite3_step $VM1] \
|
list [sqlite3_step $VM1] \
|
||||||
[sqlite3_column_count $VM1] \
|
[sqlite3_column_count $VM1] \
|
||||||
|
@ -41,7 +41,7 @@ do_test check-1.3 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 VALUES(6,7);
|
INSERT INTO t1 VALUES(6,7);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test check-1.4 {
|
do_test check-1.4 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -51,7 +51,7 @@ do_test check-1.5 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 VALUES(4,3);
|
INSERT INTO t1 VALUES(4,3);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test check-1.6 {
|
do_test check-1.6 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -88,7 +88,7 @@ do_test check-1.12 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t1 SET x=7 WHERE x==2
|
UPDATE t1 SET x=7 WHERE x==2
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test check-1.13 {
|
do_test check-1.13 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -98,7 +98,7 @@ do_test check-1.14 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t1 SET x=5 WHERE x==2
|
UPDATE t1 SET x=5 WHERE x==2
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test check-1.15 {
|
do_test check-1.15 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -142,17 +142,17 @@ do_test check-2.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 VALUES(1.1, NULL, NULL);
|
INSERT INTO t2 VALUES(1.1, NULL, NULL);
|
||||||
}
|
}
|
||||||
} {1 {constraint one failed}}
|
} {1 {CHECK constraint failed: one}}
|
||||||
do_test check-2.5 {
|
do_test check-2.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 VALUES(NULL, 5, NULL);
|
INSERT INTO t2 VALUES(NULL, 5, NULL);
|
||||||
}
|
}
|
||||||
} {1 {constraint two failed}}
|
} {1 {CHECK constraint failed: two}}
|
||||||
do_test check-2.6 {
|
do_test check-2.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 VALUES(NULL, NULL, 3.14159);
|
INSERT INTO t2 VALUES(NULL, NULL, 3.14159);
|
||||||
}
|
}
|
||||||
} {1 {constraint three failed}}
|
} {1 {CHECK constraint failed: three}}
|
||||||
|
|
||||||
# Undocumented behavior: The CONSTRAINT name clause can follow a constraint.
|
# Undocumented behavior: The CONSTRAINT name clause can follow a constraint.
|
||||||
# Such a clause is ignored. But the parser must accept it for backwards
|
# Such a clause is ignored. But the parser must accept it for backwards
|
||||||
@ -172,7 +172,7 @@ do_test check-2.11 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2b VALUES('xyzzy','hi',5);
|
INSERT INTO t2b VALUES('xyzzy','hi',5);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2b}}
|
||||||
do_test check-2.12 {
|
do_test check-2.12 {
|
||||||
execsql {
|
execsql {
|
||||||
CREATE TABLE t2c(
|
CREATE TABLE t2c(
|
||||||
@ -188,7 +188,7 @@ do_test check-2.13 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2c VALUES('xyzzy',7,8);
|
INSERT INTO t2c VALUES('xyzzy',7,8);
|
||||||
}
|
}
|
||||||
} {1 {constraint x_two failed}}
|
} {1 {CHECK constraint failed: x_two}}
|
||||||
do_test check-2.cleanup {
|
do_test check-2.cleanup {
|
||||||
execsql {
|
execsql {
|
||||||
DROP TABLE IF EXISTS t2b;
|
DROP TABLE IF EXISTS t2b;
|
||||||
@ -256,7 +256,7 @@ do_test check-3.9 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t3 VALUES(111,222,333);
|
INSERT INTO t3 VALUES(111,222,333);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t3}}
|
||||||
|
|
||||||
do_test check-4.1 {
|
do_test check-4.1 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -298,7 +298,7 @@ do_test check-4.6 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t4 SET x=0, y=1;
|
UPDATE t4 SET x=0, y=1;
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t4}}
|
||||||
do_test check-4.7 {
|
do_test check-4.7 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t4;
|
SELECT * FROM t4;
|
||||||
@ -316,7 +316,7 @@ do_test check-4.9 {
|
|||||||
PRAGMA ignore_check_constraints=OFF;
|
PRAGMA ignore_check_constraints=OFF;
|
||||||
UPDATE t4 SET x=0, y=2;
|
UPDATE t4 SET x=0, y=2;
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t4}}
|
||||||
ifcapable vacuum {
|
ifcapable vacuum {
|
||||||
do_test check_4.10 {
|
do_test check_4.10 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -367,7 +367,7 @@ do_test check-6.5 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE OR FAIL t1 SET x=7-x, y=y+1;
|
UPDATE OR FAIL t1 SET x=7-x, y=y+1;
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test check-6.6 {
|
do_test check-6.6 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -379,7 +379,7 @@ do_test check-6.7 {
|
|||||||
INSERT INTO t1 VALUES(1,30.0);
|
INSERT INTO t1 VALUES(1,30.0);
|
||||||
INSERT OR ROLLBACK INTO t1 VALUES(8,40.0);
|
INSERT OR ROLLBACK INTO t1 VALUES(8,40.0);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test check-6.8 {
|
do_test check-6.8 {
|
||||||
catchsql {
|
catchsql {
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@ -398,7 +398,7 @@ do_test check-6.12 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
REPLACE INTO t1 VALUES(6,7);
|
REPLACE INTO t1 VALUES(6,7);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test check-6.13 {
|
do_test check-6.13 {
|
||||||
execsql {SELECT * FROM t1}
|
execsql {SELECT * FROM t1}
|
||||||
} {3 12.0 2 20.0}
|
} {3 12.0 2 20.0}
|
||||||
@ -426,7 +426,8 @@ db func myfunc myfunc
|
|||||||
|
|
||||||
do_execsql_test 7.1 { CREATE TABLE t6(a CHECK (myfunc(a))) }
|
do_execsql_test 7.1 { CREATE TABLE t6(a CHECK (myfunc(a))) }
|
||||||
do_execsql_test 7.2 { INSERT INTO t6 VALUES(9) }
|
do_execsql_test 7.2 { INSERT INTO t6 VALUES(9) }
|
||||||
do_catchsql_test 7.3 { INSERT INTO t6 VALUES(11) } {1 {constraint failed}}
|
do_catchsql_test 7.3 { INSERT INTO t6 VALUES(11) } \
|
||||||
|
{1 {CHECK constraint failed: t6}}
|
||||||
|
|
||||||
do_test 7.4 {
|
do_test 7.4 {
|
||||||
sqlite3 db2 test.db
|
sqlite3 db2 test.db
|
||||||
@ -449,7 +450,7 @@ do_test 7.7 {
|
|||||||
do_test 7.8 {
|
do_test 7.8 {
|
||||||
db2 func myfunc myfunc
|
db2 func myfunc myfunc
|
||||||
catchsql { INSERT INTO t6 VALUES(12) } db2
|
catchsql { INSERT INTO t6 VALUES(12) } db2
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t6}}
|
||||||
|
|
||||||
# 2013-08-02: Silently ignore database name qualifiers in CHECK constraints.
|
# 2013-08-02: Silently ignore database name qualifiers in CHECK constraints.
|
||||||
#
|
#
|
||||||
|
@ -473,7 +473,7 @@ do_test collate4-3.1 {
|
|||||||
INSERT INTO collate4t1 VALUES('abc');
|
INSERT INTO collate4t1 VALUES('abc');
|
||||||
INSERT INTO collate4t1 VALUES('ABC');
|
INSERT INTO collate4t1 VALUES('ABC');
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
do_test collate4-3.2 {
|
do_test collate4-3.2 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM collate4t1;
|
SELECT * FROM collate4t1;
|
||||||
@ -483,13 +483,13 @@ do_test collate4-3.3 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO collate4t1 SELECT upper(a) FROM collate4t1;
|
INSERT INTO collate4t1 SELECT upper(a) FROM collate4t1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
do_test collate4-3.4 {
|
do_test collate4-3.4 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO collate4t1 VALUES(1);
|
INSERT INTO collate4t1 VALUES(1);
|
||||||
UPDATE collate4t1 SET a = 'abc';
|
UPDATE collate4t1 SET a = 'abc';
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
do_test collate4-3.5 {
|
do_test collate4-3.5 {
|
||||||
execsql {
|
execsql {
|
||||||
DROP TABLE collate4t1;
|
DROP TABLE collate4t1;
|
||||||
@ -501,7 +501,7 @@ do_test collate4-3.6 {
|
|||||||
INSERT INTO collate4t1 VALUES('abc');
|
INSERT INTO collate4t1 VALUES('abc');
|
||||||
INSERT INTO collate4t1 VALUES('ABC');
|
INSERT INTO collate4t1 VALUES('ABC');
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
do_test collate4-3.7 {
|
do_test collate4-3.7 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM collate4t1;
|
SELECT * FROM collate4t1;
|
||||||
@ -511,13 +511,13 @@ do_test collate4-3.8 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO collate4t1 SELECT upper(a) FROM collate4t1;
|
INSERT INTO collate4t1 SELECT upper(a) FROM collate4t1;
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
do_test collate4-3.9 {
|
do_test collate4-3.9 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO collate4t1 VALUES(1);
|
INSERT INTO collate4t1 VALUES(1);
|
||||||
UPDATE collate4t1 SET a = 'abc';
|
UPDATE collate4t1 SET a = 'abc';
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
do_test collate4-3.10 {
|
do_test collate4-3.10 {
|
||||||
execsql {
|
execsql {
|
||||||
DROP TABLE collate4t1;
|
DROP TABLE collate4t1;
|
||||||
@ -530,7 +530,7 @@ do_test collate4-3.11 {
|
|||||||
INSERT INTO collate4t1 VALUES('abc');
|
INSERT INTO collate4t1 VALUES('abc');
|
||||||
INSERT INTO collate4t1 VALUES('ABC');
|
INSERT INTO collate4t1 VALUES('ABC');
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
do_test collate4-3.12 {
|
do_test collate4-3.12 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM collate4t1;
|
SELECT * FROM collate4t1;
|
||||||
@ -540,13 +540,13 @@ do_test collate4-3.13 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO collate4t1 SELECT upper(a) FROM collate4t1;
|
INSERT INTO collate4t1 SELECT upper(a) FROM collate4t1;
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
do_test collate4-3.14 {
|
do_test collate4-3.14 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO collate4t1 VALUES(1);
|
INSERT INTO collate4t1 VALUES(1);
|
||||||
UPDATE collate4t1 SET a = 'abc';
|
UPDATE collate4t1 SET a = 'abc';
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: collate4t1.a}}
|
||||||
|
|
||||||
do_test collate4-3.15 {
|
do_test collate4-3.15 {
|
||||||
execsql {
|
execsql {
|
||||||
|
@ -242,7 +242,7 @@ foreach {i conf1 cmd t0 t1 t2} {
|
|||||||
15 {} {INSERT OR ABORT} 1 {} 1
|
15 {} {INSERT OR ABORT} 1 {} 1
|
||||||
16 {} {INSERT OR ROLLBACK} 1 {} {}
|
16 {} {INSERT OR ROLLBACK} 1 {} {}
|
||||||
} {
|
} {
|
||||||
if {$t0} {set t1 {t1.c may not be NULL}}
|
if {$t0} {set t1 {NOT NULL constraint failed: t1.c}}
|
||||||
do_test conflict-5.$i {
|
do_test conflict-5.$i {
|
||||||
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
|
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
|
||||||
set r0 [catch {execsql [subst {
|
set r0 [catch {execsql [subst {
|
||||||
@ -306,7 +306,7 @@ foreach {i conf1 cmd t0 t1 t2 t3 t4} {
|
|||||||
15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 1
|
15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 1
|
||||||
16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0 0
|
16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0 0
|
||||||
} {
|
} {
|
||||||
if {$t0} {set t1 {column a is not unique}}
|
if {$t0} {set t1 {UNIQUE constraint failed: t1.a}}
|
||||||
if {[info exists TEMP_STORE] && $TEMP_STORE==3} {
|
if {[info exists TEMP_STORE] && $TEMP_STORE==3} {
|
||||||
set t3 0
|
set t3 0
|
||||||
} else {
|
} else {
|
||||||
@ -493,13 +493,13 @@ do_test conflict-9.5 {
|
|||||||
INSERT INTO t2 VALUES(3,1,3,3,3);
|
INSERT INTO t2 VALUES(3,1,3,3,3);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t2.b}}
|
||||||
do_test conflict-9.6 {
|
do_test conflict-9.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t2 SET b=b+1 WHERE b=1;
|
UPDATE t2 SET b=b+1 WHERE b=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t2.b}}
|
||||||
do_test conflict-9.7 {
|
do_test conflict-9.7 {
|
||||||
catchsql {
|
catchsql {
|
||||||
BEGIN;
|
BEGIN;
|
||||||
@ -507,7 +507,7 @@ do_test conflict-9.7 {
|
|||||||
INSERT INTO t2 VALUES(3,1,3,3,3);
|
INSERT INTO t2 VALUES(3,1,3,3,3);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t2.b}}
|
||||||
do_test conflict-9.8 {
|
do_test conflict-9.8 {
|
||||||
execsql {COMMIT}
|
execsql {COMMIT}
|
||||||
execsql {SELECT * FROM t3}
|
execsql {SELECT * FROM t3}
|
||||||
@ -519,7 +519,7 @@ do_test conflict-9.9 {
|
|||||||
UPDATE t2 SET b=b+1 WHERE b=1;
|
UPDATE t2 SET b=b+1 WHERE b=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t2.b}}
|
||||||
do_test conflict-9.10 {
|
do_test conflict-9.10 {
|
||||||
execsql {COMMIT}
|
execsql {COMMIT}
|
||||||
execsql {SELECT * FROM t3}
|
execsql {SELECT * FROM t3}
|
||||||
@ -529,13 +529,13 @@ do_test conflict-9.11 {
|
|||||||
INSERT INTO t2 VALUES(3,3,3,1,3);
|
INSERT INTO t2 VALUES(3,3,3,1,3);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column d is not unique}}
|
} {1 {UNIQUE constraint failed: t2.d}}
|
||||||
do_test conflict-9.12 {
|
do_test conflict-9.12 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t2 SET d=d+1 WHERE d=1;
|
UPDATE t2 SET d=d+1 WHERE d=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column d is not unique}}
|
} {1 {UNIQUE constraint failed: t2.d}}
|
||||||
do_test conflict-9.13 {
|
do_test conflict-9.13 {
|
||||||
catchsql {
|
catchsql {
|
||||||
BEGIN;
|
BEGIN;
|
||||||
@ -543,7 +543,7 @@ do_test conflict-9.13 {
|
|||||||
INSERT INTO t2 VALUES(3,3,3,1,3);
|
INSERT INTO t2 VALUES(3,3,3,1,3);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column d is not unique}}
|
} {1 {UNIQUE constraint failed: t2.d}}
|
||||||
do_test conflict-9.14 {
|
do_test conflict-9.14 {
|
||||||
execsql {COMMIT}
|
execsql {COMMIT}
|
||||||
execsql {SELECT * FROM t3}
|
execsql {SELECT * FROM t3}
|
||||||
@ -555,7 +555,7 @@ do_test conflict-9.15 {
|
|||||||
UPDATE t2 SET d=d+1 WHERE d=1;
|
UPDATE t2 SET d=d+1 WHERE d=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column d is not unique}}
|
} {1 {UNIQUE constraint failed: t2.d}}
|
||||||
do_test conflict-9.16 {
|
do_test conflict-9.16 {
|
||||||
execsql {COMMIT}
|
execsql {COMMIT}
|
||||||
execsql {SELECT * FROM t3}
|
execsql {SELECT * FROM t3}
|
||||||
@ -565,13 +565,13 @@ do_test conflict-9.17 {
|
|||||||
INSERT INTO t2 VALUES(3,3,3,3,1);
|
INSERT INTO t2 VALUES(3,3,3,3,1);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column e is not unique}}
|
} {1 {UNIQUE constraint failed: t2.e}}
|
||||||
do_test conflict-9.18 {
|
do_test conflict-9.18 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t2 SET e=e+1 WHERE e=1;
|
UPDATE t2 SET e=e+1 WHERE e=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column e is not unique}}
|
} {1 {UNIQUE constraint failed: t2.e}}
|
||||||
do_test conflict-9.19 {
|
do_test conflict-9.19 {
|
||||||
catchsql {
|
catchsql {
|
||||||
BEGIN;
|
BEGIN;
|
||||||
@ -579,7 +579,7 @@ do_test conflict-9.19 {
|
|||||||
INSERT INTO t2 VALUES(3,3,3,3,1);
|
INSERT INTO t2 VALUES(3,3,3,3,1);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column e is not unique}}
|
} {1 {UNIQUE constraint failed: t2.e}}
|
||||||
verify_ex_errcode conflict-9.21b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode conflict-9.21b SQLITE_CONSTRAINT_UNIQUE
|
||||||
do_test conflict-9.20 {
|
do_test conflict-9.20 {
|
||||||
catch {execsql {COMMIT}}
|
catch {execsql {COMMIT}}
|
||||||
@ -592,7 +592,7 @@ do_test conflict-9.21 {
|
|||||||
UPDATE t2 SET e=e+1 WHERE e=1;
|
UPDATE t2 SET e=e+1 WHERE e=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column e is not unique}}
|
} {1 {UNIQUE constraint failed: t2.e}}
|
||||||
verify_ex_errcode conflict-9.21b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode conflict-9.21b SQLITE_CONSTRAINT_UNIQUE
|
||||||
do_test conflict-9.22 {
|
do_test conflict-9.22 {
|
||||||
catch {execsql {COMMIT}}
|
catch {execsql {COMMIT}}
|
||||||
@ -782,7 +782,7 @@ do_test conflict-12.3 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t5 SET a=a+1 WHERE a=1;
|
UPDATE t5 SET a=a+1 WHERE a=1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t5.a}}
|
||||||
verify_ex_errcode conflict-12.3b SQLITE_CONSTRAINT_PRIMARYKEY
|
verify_ex_errcode conflict-12.3b SQLITE_CONSTRAINT_PRIMARYKEY
|
||||||
do_test conflict-12.4 {
|
do_test conflict-12.4 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -790,6 +790,14 @@ do_test conflict-12.4 {
|
|||||||
SELECT * FROM t5;
|
SELECT * FROM t5;
|
||||||
}
|
}
|
||||||
} {2 one}
|
} {2 one}
|
||||||
|
do_test conflict-12.5 {
|
||||||
|
catchsql {
|
||||||
|
CREATE TABLE t5b(x);
|
||||||
|
INSERT INTO t5b(rowid, x) VALUES(1,10),(2,11);
|
||||||
|
UPDATE t5b SET rowid=rowid+1 WHERE x=10;
|
||||||
|
}
|
||||||
|
} {1 {UNIQUE constraint failed: t5b.rowid}}
|
||||||
|
verify_ex_errcode conflict-12.5b SQLITE_CONSTRAINT_ROWID
|
||||||
|
|
||||||
|
|
||||||
# Ticket [c38baa3d969eab7946dc50ba9d9b4f0057a19437]
|
# Ticket [c38baa3d969eab7946dc50ba9d9b4f0057a19437]
|
||||||
@ -804,7 +812,7 @@ do_test conflict-13.1 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
REPLACE INTO t13 VALUES(2);
|
REPLACE INTO t13 VALUES(2);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t13}}
|
||||||
verify_ex_errcode conflict-13.1b SQLITE_CONSTRAINT_CHECK
|
verify_ex_errcode conflict-13.1b SQLITE_CONSTRAINT_CHECK
|
||||||
do_test conflict-13.2 {
|
do_test conflict-13.2 {
|
||||||
execsql {
|
execsql {
|
||||||
|
@ -241,7 +241,7 @@ foreach {i conf1 cmd t0 t1 t2} {
|
|||||||
15 {} {INSERT OR ABORT} 1 {} 1
|
15 {} {INSERT OR ABORT} 1 {} 1
|
||||||
16 {} {INSERT OR ROLLBACK} 1 {} {}
|
16 {} {INSERT OR ROLLBACK} 1 {} {}
|
||||||
} {
|
} {
|
||||||
if {$t0} {set t1 {t1.c may not be NULL}}
|
if {$t0} {set t1 {NOT NULL constraint failed: t1.c}}
|
||||||
do_test conflict2-5.$i {
|
do_test conflict2-5.$i {
|
||||||
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
|
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
|
||||||
set r0 [catch {execsql [subst {
|
set r0 [catch {execsql [subst {
|
||||||
@ -305,7 +305,7 @@ foreach {i conf1 cmd t0 t1 t2 t3 t4} {
|
|||||||
15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 1
|
15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 1
|
||||||
16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0 0
|
16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0 0
|
||||||
} {
|
} {
|
||||||
if {$t0} {set t1 {PRIMARY KEY must be unique}}
|
if {$t0} {set t1 {UNIQUE constraint failed: t1.a}}
|
||||||
if {[info exists TEMP_STORE] && $TEMP_STORE==3} {
|
if {[info exists TEMP_STORE] && $TEMP_STORE==3} {
|
||||||
set t3 0
|
set t3 0
|
||||||
} else {
|
} else {
|
||||||
@ -491,7 +491,7 @@ do_test conflict2-9.5 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 VALUES(3,1,3,3,3);
|
INSERT INTO t2 VALUES(3,1,3,3,3);
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t2.b}}
|
||||||
do_test conflict2-9.5b {
|
do_test conflict2-9.5b {
|
||||||
db eval {SELECT * FROM t2;}
|
db eval {SELECT * FROM t2;}
|
||||||
} {1 1 1 1 1 2 2 2 2 2}
|
} {1 1 1 1 1 2 2 2 2 2}
|
||||||
@ -500,7 +500,7 @@ do_test conflict2-9.6 {
|
|||||||
UPDATE t2 SET b=b+1 WHERE b=1;
|
UPDATE t2 SET b=b+1 WHERE b=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t2.b}}
|
||||||
do_test conflict2-9.6b {
|
do_test conflict2-9.6b {
|
||||||
db eval {SELECT * FROM t2;}
|
db eval {SELECT * FROM t2;}
|
||||||
} {1 1 1 1 1 2 2 2 2 2}
|
} {1 1 1 1 1 2 2 2 2 2}
|
||||||
@ -511,7 +511,7 @@ do_test conflict2-9.7 {
|
|||||||
INSERT INTO t2 VALUES(3,1,3,3,3);
|
INSERT INTO t2 VALUES(3,1,3,3,3);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t2.b}}
|
||||||
do_test conflict2-9.8 {
|
do_test conflict2-9.8 {
|
||||||
execsql {COMMIT}
|
execsql {COMMIT}
|
||||||
execsql {SELECT * FROM t3}
|
execsql {SELECT * FROM t3}
|
||||||
@ -523,7 +523,7 @@ do_test conflict2-9.9 {
|
|||||||
UPDATE t2 SET b=b+1 WHERE b=1;
|
UPDATE t2 SET b=b+1 WHERE b=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t2.b}}
|
||||||
do_test conflict2-9.10 {
|
do_test conflict2-9.10 {
|
||||||
execsql {COMMIT}
|
execsql {COMMIT}
|
||||||
execsql {SELECT * FROM t3}
|
execsql {SELECT * FROM t3}
|
||||||
@ -533,13 +533,13 @@ do_test conflict2-9.11 {
|
|||||||
INSERT INTO t2 VALUES(3,3,3,1,3);
|
INSERT INTO t2 VALUES(3,3,3,1,3);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column d is not unique}}
|
} {1 {UNIQUE constraint failed: t2.d}}
|
||||||
do_test conflict2-9.12 {
|
do_test conflict2-9.12 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t2 SET d=d+1 WHERE d=1;
|
UPDATE t2 SET d=d+1 WHERE d=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column d is not unique}}
|
} {1 {UNIQUE constraint failed: t2.d}}
|
||||||
do_test conflict2-9.13 {
|
do_test conflict2-9.13 {
|
||||||
catchsql {
|
catchsql {
|
||||||
BEGIN;
|
BEGIN;
|
||||||
@ -547,7 +547,7 @@ do_test conflict2-9.13 {
|
|||||||
INSERT INTO t2 VALUES(3,3,3,1,3);
|
INSERT INTO t2 VALUES(3,3,3,1,3);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column d is not unique}}
|
} {1 {UNIQUE constraint failed: t2.d}}
|
||||||
do_test conflict2-9.14 {
|
do_test conflict2-9.14 {
|
||||||
execsql {COMMIT}
|
execsql {COMMIT}
|
||||||
execsql {SELECT * FROM t3}
|
execsql {SELECT * FROM t3}
|
||||||
@ -559,7 +559,7 @@ do_test conflict2-9.15 {
|
|||||||
UPDATE t2 SET d=d+1 WHERE d=1;
|
UPDATE t2 SET d=d+1 WHERE d=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column d is not unique}}
|
} {1 {UNIQUE constraint failed: t2.d}}
|
||||||
do_test conflict2-9.16 {
|
do_test conflict2-9.16 {
|
||||||
execsql {COMMIT}
|
execsql {COMMIT}
|
||||||
execsql {SELECT * FROM t3}
|
execsql {SELECT * FROM t3}
|
||||||
@ -569,13 +569,13 @@ do_test conflict2-9.17 {
|
|||||||
INSERT INTO t2 VALUES(3,3,3,3,1);
|
INSERT INTO t2 VALUES(3,3,3,3,1);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column e is not unique}}
|
} {1 {UNIQUE constraint failed: t2.e}}
|
||||||
do_test conflict2-9.18 {
|
do_test conflict2-9.18 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t2 SET e=e+1 WHERE e=1;
|
UPDATE t2 SET e=e+1 WHERE e=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column e is not unique}}
|
} {1 {UNIQUE constraint failed: t2.e}}
|
||||||
do_test conflict2-9.19 {
|
do_test conflict2-9.19 {
|
||||||
catchsql {
|
catchsql {
|
||||||
BEGIN;
|
BEGIN;
|
||||||
@ -583,7 +583,7 @@ do_test conflict2-9.19 {
|
|||||||
INSERT INTO t2 VALUES(3,3,3,3,1);
|
INSERT INTO t2 VALUES(3,3,3,3,1);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column e is not unique}}
|
} {1 {UNIQUE constraint failed: t2.e}}
|
||||||
verify_ex_errcode conflict2-9.21b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode conflict2-9.21b SQLITE_CONSTRAINT_UNIQUE
|
||||||
do_test conflict2-9.20 {
|
do_test conflict2-9.20 {
|
||||||
catch {execsql {COMMIT}}
|
catch {execsql {COMMIT}}
|
||||||
@ -596,7 +596,7 @@ do_test conflict2-9.21 {
|
|||||||
UPDATE t2 SET e=e+1 WHERE e=1;
|
UPDATE t2 SET e=e+1 WHERE e=1;
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {column e is not unique}}
|
} {1 {UNIQUE constraint failed: t2.e}}
|
||||||
verify_ex_errcode conflict2-9.21b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode conflict2-9.21b SQLITE_CONSTRAINT_UNIQUE
|
||||||
do_test conflict2-9.22 {
|
do_test conflict2-9.22 {
|
||||||
catch {execsql {COMMIT}}
|
catch {execsql {COMMIT}}
|
||||||
@ -786,7 +786,7 @@ do_test conflict2-12.3 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t5 SET a=a+1 WHERE a=1;
|
UPDATE t5 SET a=a+1 WHERE a=1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t5.a}}
|
||||||
verify_ex_errcode conflict2-12.3b SQLITE_CONSTRAINT_PRIMARYKEY
|
verify_ex_errcode conflict2-12.3b SQLITE_CONSTRAINT_PRIMARYKEY
|
||||||
do_test conflict2-12.4 {
|
do_test conflict2-12.4 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -808,7 +808,7 @@ do_test conflict2-13.1 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
REPLACE INTO t13 VALUES(2);
|
REPLACE INTO t13 VALUES(2);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t13}}
|
||||||
verify_ex_errcode conflict2-13.1b SQLITE_CONSTRAINT_CHECK
|
verify_ex_errcode conflict2-13.1b SQLITE_CONSTRAINT_CHECK
|
||||||
do_test conflict2-13.2 {
|
do_test conflict2-13.2 {
|
||||||
execsql {
|
execsql {
|
||||||
|
@ -1182,13 +1182,14 @@ do_execsql_test 4.3.0 {
|
|||||||
INSERT INTO t2 VALUES(X'ABCDEF', 'three');
|
INSERT INTO t2 VALUES(X'ABCDEF', 'three');
|
||||||
} {}
|
} {}
|
||||||
|
|
||||||
do_createtable_tests 4.3.1 -error {PRIMARY KEY must be unique} {
|
do_createtable_tests 4.3.1 -error {UNIQUE constraint failed: t1.x} {
|
||||||
1 "INSERT INTO t1 VALUES(0, 0)" {"column x is"}
|
1 "INSERT INTO t1 VALUES(0, 0)" {"column x is"}
|
||||||
2 "INSERT INTO t1 VALUES(45.5, 'abc')" {"column x is"}
|
2 "INSERT INTO t1 VALUES(45.5, 'abc')" {"column x is"}
|
||||||
3 "INSERT INTO t1 VALUES(0.0, 'abc')" {"column x is"}
|
3 "INSERT INTO t1 VALUES(0.0, 'abc')" {"column x is"}
|
||||||
4 "INSERT INTO t1 VALUES('brambles', 'abc')" {"column x is"}
|
4 "INSERT INTO t1 VALUES('brambles', 'abc')" {"column x is"}
|
||||||
5 "INSERT INTO t1 VALUES(X'ABCDEF', 'abc')" {"column x is"}
|
5 "INSERT INTO t1 VALUES(X'ABCDEF', 'abc')" {"column x is"}
|
||||||
|
}
|
||||||
|
do_createtable_tests 4.3.1 -error {UNIQUE constraint failed: t2.x, t2.y} {
|
||||||
6 "INSERT INTO t2 VALUES(0, 'zero')" {"columns x, y are"}
|
6 "INSERT INTO t2 VALUES(0, 'zero')" {"columns x, y are"}
|
||||||
7 "INSERT INTO t2 VALUES(45.5, 'one')" {"columns x, y are"}
|
7 "INSERT INTO t2 VALUES(45.5, 'one')" {"columns x, y are"}
|
||||||
8 "INSERT INTO t2 VALUES(0.0, 'zero')" {"columns x, y are"}
|
8 "INSERT INTO t2 VALUES(0.0, 'zero')" {"columns x, y are"}
|
||||||
@ -1208,13 +1209,14 @@ do_createtable_tests 4.3.2 {
|
|||||||
9 "INSERT INTO t2 VALUES('brambles', 'abc')" {}
|
9 "INSERT INTO t2 VALUES('brambles', 'abc')" {}
|
||||||
10 "INSERT INTO t2 VALUES(X'ABCDEF', 'abc')" {}
|
10 "INSERT INTO t2 VALUES(X'ABCDEF', 'abc')" {}
|
||||||
}
|
}
|
||||||
do_createtable_tests 4.3.3 -error {PRIMARY KEY must be unique} {
|
do_createtable_tests 4.3.3 -error {UNIQUE constraint failed: t1.x} {
|
||||||
1 "UPDATE t1 SET x=0 WHERE y='two'" {"column x is"}
|
1 "UPDATE t1 SET x=0 WHERE y='two'" {"column x is"}
|
||||||
2 "UPDATE t1 SET x='brambles' WHERE y='three'" {"column x is"}
|
2 "UPDATE t1 SET x='brambles' WHERE y='three'" {"column x is"}
|
||||||
3 "UPDATE t1 SET x=45.5 WHERE y='zero'" {"column x is"}
|
3 "UPDATE t1 SET x=45.5 WHERE y='zero'" {"column x is"}
|
||||||
4 "UPDATE t1 SET x=X'ABCDEF' WHERE y='one'" {"column x is"}
|
4 "UPDATE t1 SET x=X'ABCDEF' WHERE y='one'" {"column x is"}
|
||||||
5 "UPDATE t1 SET x=0.0 WHERE y='three'" {"column x is"}
|
5 "UPDATE t1 SET x=0.0 WHERE y='three'" {"column x is"}
|
||||||
|
}
|
||||||
|
do_createtable_tests 4.3.3 -error {UNIQUE constraint failed: t2.x, t2.y} {
|
||||||
6 "UPDATE t2 SET x=0, y='zero' WHERE y='two'" {"columns x, y are"}
|
6 "UPDATE t2 SET x=0, y='zero' WHERE y='two'" {"columns x, y are"}
|
||||||
7 "UPDATE t2 SET x='brambles', y='two' WHERE y='three'"
|
7 "UPDATE t2 SET x='brambles', y='two' WHERE y='three'"
|
||||||
{"columns x, y are"}
|
{"columns x, y are"}
|
||||||
@ -1305,24 +1307,24 @@ do_execsql_test 4.7.0 {
|
|||||||
INSERT INTO t4 VALUES('xyx', 2, 1);
|
INSERT INTO t4 VALUES('xyx', 2, 1);
|
||||||
INSERT INTO t4 VALUES('uvw', 1, 1);
|
INSERT INTO t4 VALUES('uvw', 1, 1);
|
||||||
}
|
}
|
||||||
do_createtable_tests 4.7.1 -error { %s not unique } {
|
do_createtable_tests 4.7.1 -error {UNIQUE constraint failed: %s} {
|
||||||
1 "INSERT INTO t1 VALUES(1, 'one')" {{column a is}}
|
1 "INSERT INTO t1 VALUES(1, 'one')" {{t1.a}}
|
||||||
2 "INSERT INTO t1 VALUES(4.3, 'two')" {{column a is}}
|
2 "INSERT INTO t1 VALUES(4.3, 'two')" {{t1.a}}
|
||||||
3 "INSERT INTO t1 VALUES('reveal', 'three')" {{column a is}}
|
3 "INSERT INTO t1 VALUES('reveal', 'three')" {{t1.a}}
|
||||||
4 "INSERT INTO t1 VALUES(X'123456', 'four')" {{column a is}}
|
4 "INSERT INTO t1 VALUES(X'123456', 'four')" {{t1.a}}
|
||||||
|
|
||||||
5 "UPDATE t1 SET a = 1 WHERE rowid=2" {{column a is}}
|
5 "UPDATE t1 SET a = 1 WHERE rowid=2" {{t1.a}}
|
||||||
6 "UPDATE t1 SET a = 4.3 WHERE rowid=3" {{column a is}}
|
6 "UPDATE t1 SET a = 4.3 WHERE rowid=3" {{t1.a}}
|
||||||
7 "UPDATE t1 SET a = 'reveal' WHERE rowid=4" {{column a is}}
|
7 "UPDATE t1 SET a = 'reveal' WHERE rowid=4" {{t1.a}}
|
||||||
8 "UPDATE t1 SET a = X'123456' WHERE rowid=1" {{column a is}}
|
8 "UPDATE t1 SET a = X'123456' WHERE rowid=1" {{t1.a}}
|
||||||
|
|
||||||
9 "INSERT INTO t4 VALUES('xyx', 1, 1)" {{columns a, b, c are}}
|
9 "INSERT INTO t4 VALUES('xyx', 1, 1)" {{t4.a, t4.b, t4.c}}
|
||||||
10 "INSERT INTO t4 VALUES('xyx', 2, 1)" {{columns a, b, c are}}
|
10 "INSERT INTO t4 VALUES('xyx', 2, 1)" {{t4.a, t4.b, t4.c}}
|
||||||
11 "INSERT INTO t4 VALUES('uvw', 1, 1)" {{columns a, b, c are}}
|
11 "INSERT INTO t4 VALUES('uvw', 1, 1)" {{t4.a, t4.b, t4.c}}
|
||||||
|
|
||||||
12 "UPDATE t4 SET a='xyx' WHERE rowid=3" {{columns a, b, c are}}
|
12 "UPDATE t4 SET a='xyx' WHERE rowid=3" {{t4.a, t4.b, t4.c}}
|
||||||
13 "UPDATE t4 SET b=1 WHERE rowid=2" {{columns a, b, c are}}
|
13 "UPDATE t4 SET b=1 WHERE rowid=2" {{t4.a, t4.b, t4.c}}
|
||||||
14 "UPDATE t4 SET a=0, b=0, c=0" {{columns a, b, c are}}
|
14 "UPDATE t4 SET a=0, b=0, c=0" {{t4.a, t4.b, t4.c}}
|
||||||
}
|
}
|
||||||
|
|
||||||
# EVIDENCE-OF: R-21289-11559 As with PRIMARY KEY constraints, for the
|
# EVIDENCE-OF: R-21289-11559 As with PRIMARY KEY constraints, for the
|
||||||
@ -1404,21 +1406,21 @@ do_execsql_test 4.11 {
|
|||||||
INSERT INTO t2 SELECT * FROM x2;
|
INSERT INTO t2 SELECT * FROM x2;
|
||||||
}
|
}
|
||||||
|
|
||||||
do_createtable_tests 4.11 -error {constraint failed} {
|
do_createtable_tests 4.11 -error {CHECK constraint failed: %s} {
|
||||||
1a "INSERT INTO x1 VALUES('one', 0)" {}
|
1a "INSERT INTO x1 VALUES('one', 0)" {x1}
|
||||||
1b "INSERT INTO t1 VALUES('one', -4.0)" {}
|
1b "INSERT INTO t1 VALUES('one', -4.0)" {t1}
|
||||||
|
|
||||||
2a "INSERT INTO x2 VALUES('abc', 1)" {}
|
2a "INSERT INTO x2 VALUES('abc', 1)" {x2}
|
||||||
2b "INSERT INTO t2 VALUES('abc', 1)" {}
|
2b "INSERT INTO t2 VALUES('abc', 1)" {t2}
|
||||||
|
|
||||||
3a "INSERT INTO x2 VALUES(0, 'abc')" {}
|
3a "INSERT INTO x2 VALUES(0, 'abc')" {x2}
|
||||||
3b "INSERT INTO t2 VALUES(0, 'abc')" {}
|
3b "INSERT INTO t2 VALUES(0, 'abc')" {t2}
|
||||||
|
|
||||||
4a "UPDATE t1 SET b=-1 WHERE rowid=1" {}
|
4a "UPDATE t1 SET b=-1 WHERE rowid=1" {t1}
|
||||||
4b "UPDATE x1 SET b=-1 WHERE rowid=1" {}
|
4b "UPDATE x1 SET b=-1 WHERE rowid=1" {x1}
|
||||||
|
|
||||||
4a "UPDATE x2 SET a='' WHERE rowid=1" {}
|
4a "UPDATE x2 SET a='' WHERE rowid=1" {x2}
|
||||||
4b "UPDATE t2 SET a='' WHERE rowid=1" {}
|
4b "UPDATE t2 SET a='' WHERE rowid=1" {t2}
|
||||||
}
|
}
|
||||||
|
|
||||||
# EVIDENCE-OF: R-34109-39108 If the CHECK expression evaluates to NULL,
|
# EVIDENCE-OF: R-34109-39108 If the CHECK expression evaluates to NULL,
|
||||||
@ -1469,9 +1471,7 @@ do_execsql_test 4.14.0 {
|
|||||||
INSERT INTO t3 VALUES('x', 'y', 'z');
|
INSERT INTO t3 VALUES('x', 'y', 'z');
|
||||||
INSERT INTO t3 VALUES(1, 2, 3);
|
INSERT INTO t3 VALUES(1, 2, 3);
|
||||||
}
|
}
|
||||||
do_createtable_tests 4.14 -error {
|
do_createtable_tests 4.14 -error {NOT NULL constraint failed: %s} {
|
||||||
%s may not be NULL
|
|
||||||
} {
|
|
||||||
1 "INSERT INTO t1 VALUES(NULL, 'a')" {t1.a}
|
1 "INSERT INTO t1 VALUES(NULL, 'a')" {t1.a}
|
||||||
2 "INSERT INTO t2 VALUES(NULL, 'b')" {t2.a}
|
2 "INSERT INTO t2 VALUES(NULL, 'b')" {t2.a}
|
||||||
3 "INSERT INTO t3 VALUES('c', 'd', NULL)" {t3.c}
|
3 "INSERT INTO t3 VALUES('c', 'd', NULL)" {t3.c}
|
||||||
@ -1537,12 +1537,12 @@ do_execsql_test 4.15.0 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach {tn tbl res ac data} {
|
foreach {tn tbl res ac data} {
|
||||||
1 t1_ab {1 {PRIMARY KEY must be unique}} 0 {1 one 2 two 3 three}
|
1 t1_ab {1 {UNIQUE constraint failed: t1_ab.a}} 0 {1 one 2 two 3 three}
|
||||||
2 t1_ro {1 {PRIMARY KEY must be unique}} 1 {1 one 2 two}
|
2 t1_ro {1 {UNIQUE constraint failed: t1_ro.a}} 1 {1 one 2 two}
|
||||||
3 t1_fa {1 {PRIMARY KEY must be unique}} 0 {1 one 2 two 3 three 4 string}
|
3 t1_fa {1 {UNIQUE constraint failed: t1_fa.a}} 0 {1 one 2 two 3 three 4 string}
|
||||||
4 t1_ig {0 {}} 0 {1 one 2 two 3 three 4 string 6 string}
|
4 t1_ig {0 {}} 0 {1 one 2 two 3 three 4 string 6 string}
|
||||||
5 t1_re {0 {}} 0 {1 one 2 two 4 string 3 string 6 string}
|
5 t1_re {0 {}} 0 {1 one 2 two 4 string 3 string 6 string}
|
||||||
6 t1_xx {1 {PRIMARY KEY must be unique}} 0 {1 one 2 two 3 three}
|
6 t1_xx {1 {UNIQUE constraint failed: t1_xx.a}} 0 {1 one 2 two 3 three}
|
||||||
} {
|
} {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
do_execsql_test 4.15.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
|
do_execsql_test 4.15.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
|
||||||
@ -1555,12 +1555,12 @@ foreach {tn tbl res ac data} {
|
|||||||
do_execsql_test 4.15.$tn.4 "SELECT * FROM $tbl" $data
|
do_execsql_test 4.15.$tn.4 "SELECT * FROM $tbl" $data
|
||||||
}
|
}
|
||||||
foreach {tn tbl res ac data} {
|
foreach {tn tbl res ac data} {
|
||||||
1 t2_ab {1 {t2_ab.b may not be NULL}} 0 {1 one 2 two 3 three}
|
1 t2_ab {1 {NOT NULL constraint failed: t2_ab.b}} 0 {1 one 2 two 3 three}
|
||||||
2 t2_ro {1 {t2_ro.b may not be NULL}} 1 {1 one 2 two}
|
2 t2_ro {1 {NOT NULL constraint failed: t2_ro.b}} 1 {1 one 2 two}
|
||||||
3 t2_fa {1 {t2_fa.b may not be NULL}} 0 {1 one 2 two 3 three 4 xx}
|
3 t2_fa {1 {NOT NULL constraint failed: t2_fa.b}} 0 {1 one 2 two 3 three 4 xx}
|
||||||
4 t2_ig {0 {}} 0 {1 one 2 two 3 three 4 xx 6 xx}
|
4 t2_ig {0 {}} 0 {1 one 2 two 3 three 4 xx 6 xx}
|
||||||
5 t2_re {1 {t2_re.b may not be NULL}} 0 {1 one 2 two 3 three}
|
5 t2_re {1 {NOT NULL constraint failed: t2_re.b}} 0 {1 one 2 two 3 three}
|
||||||
6 t2_xx {1 {t2_xx.b may not be NULL}} 0 {1 one 2 two 3 three}
|
6 t2_xx {1 {NOT NULL constraint failed: t2_xx.b}} 0 {1 one 2 two 3 three}
|
||||||
} {
|
} {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
do_execsql_test 4.16.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
|
do_execsql_test 4.16.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
|
||||||
@ -1573,12 +1573,16 @@ foreach {tn tbl res ac data} {
|
|||||||
do_execsql_test 4.16.$tn.4 "SELECT * FROM $tbl" $data
|
do_execsql_test 4.16.$tn.4 "SELECT * FROM $tbl" $data
|
||||||
}
|
}
|
||||||
foreach {tn tbl res ac data} {
|
foreach {tn tbl res ac data} {
|
||||||
1 t3_ab {1 {columns a, b are not unique}} 0 {1 one 2 two 3 three}
|
1 t3_ab {1 {UNIQUE constraint failed: t3_ab.a, t3_ab.b}}
|
||||||
2 t3_ro {1 {columns a, b are not unique}} 1 {1 one 2 two}
|
0 {1 one 2 two 3 three}
|
||||||
3 t3_fa {1 {columns a, b are not unique}} 0 {1 one 2 two 3 three 4 three}
|
2 t3_ro {1 {UNIQUE constraint failed: t3_ro.a, t3_ro.b}}
|
||||||
|
1 {1 one 2 two}
|
||||||
|
3 t3_fa {1 {UNIQUE constraint failed: t3_fa.a, t3_fa.b}}
|
||||||
|
0 {1 one 2 two 3 three 4 three}
|
||||||
4 t3_ig {0 {}} 0 {1 one 2 two 3 three 4 three 6 three}
|
4 t3_ig {0 {}} 0 {1 one 2 two 3 three 4 three 6 three}
|
||||||
5 t3_re {0 {}} 0 {1 one 2 two 4 three 3 three 6 three}
|
5 t3_re {0 {}} 0 {1 one 2 two 4 three 3 three 6 three}
|
||||||
6 t3_xx {1 {columns a, b are not unique}} 0 {1 one 2 two 3 three}
|
6 t3_xx {1 {UNIQUE constraint failed: t3_xx.a, t3_xx.b}}
|
||||||
|
0 {1 one 2 two 3 three}
|
||||||
} {
|
} {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
do_execsql_test 4.17.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
|
do_execsql_test 4.17.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
|
||||||
@ -1609,7 +1613,7 @@ do_execsql_test 4.18.1 {
|
|||||||
do_execsql_test 4.18.2 { BEGIN; INSERT INTO t4 VALUES(5, 6) }
|
do_execsql_test 4.18.2 { BEGIN; INSERT INTO t4 VALUES(5, 6) }
|
||||||
do_catchsql_test 4.18.3 {
|
do_catchsql_test 4.18.3 {
|
||||||
INSERT INTO t4 SELECT a+4, b+4 FROM t4
|
INSERT INTO t4 SELECT a+4, b+4 FROM t4
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t4}}
|
||||||
do_test e_createtable-4.18.4 { sqlite3_get_autocommit db } 0
|
do_test e_createtable-4.18.4 { sqlite3_get_autocommit db } 0
|
||||||
do_execsql_test 4.18.5 { SELECT * FROM t4 } {1 2 3 4 5 6}
|
do_execsql_test 4.18.5 { SELECT * FROM t4 } {1 2 3 4 5 6}
|
||||||
|
|
||||||
@ -1622,7 +1626,7 @@ do_execsql_test 4.19.0 {
|
|||||||
do_catchsql_test 4.19.1 { INSERT INTO t5 VALUES(NULL, 'not null') } {0 {}}
|
do_catchsql_test 4.19.1 { INSERT INTO t5 VALUES(NULL, 'not null') } {0 {}}
|
||||||
do_execsql_test 4.19.2 { SELECT * FROM t5 } {}
|
do_execsql_test 4.19.2 { SELECT * FROM t5 } {}
|
||||||
do_catchsql_test 4.19.3 { INSERT INTO t5 VALUES('not null', NULL) } \
|
do_catchsql_test 4.19.3 { INSERT INTO t5 VALUES('not null', NULL) } \
|
||||||
{1 {t5.b may not be NULL}}
|
{1 {NOT NULL constraint failed: t5.b}}
|
||||||
do_execsql_test 4.19.4 { SELECT * FROM t5 } {}
|
do_execsql_test 4.19.4 { SELECT * FROM t5 } {}
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -1747,16 +1751,16 @@ do_execsql_test 5.4.3 {
|
|||||||
|
|
||||||
do_catchsql_test 5.4.4.1 {
|
do_catchsql_test 5.4.4.1 {
|
||||||
INSERT INTO t6 VALUES(2)
|
INSERT INTO t6 VALUES(2)
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t6.pk}}
|
||||||
do_catchsql_test 5.4.4.2 {
|
do_catchsql_test 5.4.4.2 {
|
||||||
INSERT INTO t7 VALUES(2)
|
INSERT INTO t7 VALUES(2)
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t7.pk}}
|
||||||
do_catchsql_test 5.4.4.3 {
|
do_catchsql_test 5.4.4.3 {
|
||||||
INSERT INTO t8 VALUES(2)
|
INSERT INTO t8 VALUES(2)
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t8.pk}}
|
||||||
do_catchsql_test 5.4.4.4 {
|
do_catchsql_test 5.4.4.4 {
|
||||||
INSERT INTO t9 VALUES(2)
|
INSERT INTO t9 VALUES(2)
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t9.pk}}
|
||||||
|
|
||||||
# EVIDENCE-OF: R-56094-57830 the following three table declarations all
|
# EVIDENCE-OF: R-56094-57830 the following three table declarations all
|
||||||
# cause the column "x" to be an alias for the rowid (an integer primary
|
# cause the column "x" to be an alias for the rowid (an integer primary
|
||||||
|
106
test/e_fkey.test
106
test/e_fkey.test
@ -211,7 +211,7 @@ do_test e_fkey-6.1 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
DELETE FROM t1
|
DELETE FROM t1
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-6.2 {
|
do_test e_fkey-6.2 {
|
||||||
execsql { PRAGMA foreign_keys }
|
execsql { PRAGMA foreign_keys }
|
||||||
} {1}
|
} {1}
|
||||||
@ -265,11 +265,11 @@ do_test e_fkey-7.1 {
|
|||||||
#
|
#
|
||||||
do_test e_fkey-8.1 {
|
do_test e_fkey-8.1 {
|
||||||
catchsql { INSERT INTO track VALUES(1, 'track 1', 1) }
|
catchsql { INSERT INTO track VALUES(1, 'track 1', 1) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-8.2 {
|
do_test e_fkey-8.2 {
|
||||||
execsql { INSERT INTO artist VALUES(2, 'artist 1') }
|
execsql { INSERT INTO artist VALUES(2, 'artist 1') }
|
||||||
catchsql { INSERT INTO track VALUES(1, 'track 1', 1) }
|
catchsql { INSERT INTO track VALUES(1, 'track 1', 1) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-8.2 {
|
do_test e_fkey-8.2 {
|
||||||
execsql { INSERT INTO track VALUES(1, 'track 1', 2) }
|
execsql { INSERT INTO track VALUES(1, 'track 1', 2) }
|
||||||
} {}
|
} {}
|
||||||
@ -283,7 +283,7 @@ do_test e_fkey-8.2 {
|
|||||||
#
|
#
|
||||||
do_test e_fkey-9.1 {
|
do_test e_fkey-9.1 {
|
||||||
catchsql { DELETE FROM artist WHERE artistid = 2 }
|
catchsql { DELETE FROM artist WHERE artistid = 2 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-9.2 {
|
do_test e_fkey-9.2 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM track WHERE trackartist = 2;
|
DELETE FROM track WHERE trackartist = 2;
|
||||||
@ -311,14 +311,14 @@ do_test e_fkey-10.2 {
|
|||||||
do_test e_fkey-10.3 {
|
do_test e_fkey-10.3 {
|
||||||
# Setting the trackid to a non-NULL value fails, of course.
|
# Setting the trackid to a non-NULL value fails, of course.
|
||||||
catchsql { UPDATE track SET trackartist = 5 WHERE trackid = 1 }
|
catchsql { UPDATE track SET trackartist = 5 WHERE trackid = 1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-10.4 {
|
do_test e_fkey-10.4 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO artist VALUES(5, 'artist 5');
|
INSERT INTO artist VALUES(5, 'artist 5');
|
||||||
UPDATE track SET trackartist = 5 WHERE trackid = 1;
|
UPDATE track SET trackartist = 5 WHERE trackid = 1;
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM artist WHERE artistid = 5}
|
catchsql { DELETE FROM artist WHERE artistid = 5}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-10.5 {
|
do_test e_fkey-10.5 {
|
||||||
execsql {
|
execsql {
|
||||||
UPDATE track SET trackartist = NULL WHERE trackid = 1;
|
UPDATE track SET trackartist = NULL WHERE trackid = 1;
|
||||||
@ -344,8 +344,8 @@ proc test_r52486_21352 {tn sql} {
|
|||||||
set res [catchsql $sql]
|
set res [catchsql $sql]
|
||||||
set results {
|
set results {
|
||||||
{0 {}}
|
{0 {}}
|
||||||
{1 {PRIMARY KEY must be unique}}
|
{1 {UNIQUE constraint failed: artist.artistid}}
|
||||||
{1 {foreign key constraint failed}}
|
{1 {FOREIGN KEY constraint failed}}
|
||||||
}
|
}
|
||||||
if {[lsearch $results $res]<0} {
|
if {[lsearch $results $res]<0} {
|
||||||
error $res
|
error $res
|
||||||
@ -409,7 +409,7 @@ do_test e_fkey-12.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-12.2 {
|
do_test e_fkey-12.2 {
|
||||||
catchsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', NULL) }
|
catchsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', NULL) }
|
||||||
} {1 {track.trackartist may not be NULL}}
|
} {1 {NOT NULL constraint failed: track.trackartist}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# EVIDENCE-OF: R-16127-35442
|
# EVIDENCE-OF: R-16127-35442
|
||||||
@ -438,7 +438,7 @@ do_test e_fkey-13.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-13.2 {
|
do_test e_fkey-13.2 {
|
||||||
catchsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', 3) }
|
catchsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', 3) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-13.3 {
|
do_test e_fkey-13.3 {
|
||||||
execsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', NULL) }
|
execsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', NULL) }
|
||||||
} {}
|
} {}
|
||||||
@ -446,7 +446,7 @@ do_test e_fkey-13.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE track SET trackartist = 3 WHERE trackname = 'Mr. Bojangles';
|
UPDATE track SET trackartist = 3 WHERE trackname = 'Mr. Bojangles';
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-13.5 {
|
do_test e_fkey-13.5 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO artist VALUES(3, 'Sammy Davis Jr.');
|
INSERT INTO artist VALUES(3, 'Sammy Davis Jr.');
|
||||||
@ -464,7 +464,7 @@ do_test e_fkey-14.1 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
DELETE FROM artist WHERE artistname = 'Frank Sinatra';
|
DELETE FROM artist WHERE artistname = 'Frank Sinatra';
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-14.2 {
|
do_test e_fkey-14.2 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM track WHERE trackname = 'My Way';
|
DELETE FROM track WHERE trackname = 'My Way';
|
||||||
@ -475,7 +475,7 @@ do_test e_fkey-14.3 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE artist SET artistid=4 WHERE artistname = 'Dean Martin';
|
UPDATE artist SET artistid=4 WHERE artistname = 'Dean Martin';
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-14.4 {
|
do_test e_fkey-14.4 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM track WHERE trackname IN('That''s Amore', 'Christmas Blues');
|
DELETE FROM track WHERE trackname IN('That''s Amore', 'Christmas Blues');
|
||||||
@ -513,7 +513,7 @@ do_test e_fkey-15.1 {
|
|||||||
proc test_efkey_45 {tn isError sql} {
|
proc test_efkey_45 {tn isError sql} {
|
||||||
do_test e_fkey-15.$tn.1 "
|
do_test e_fkey-15.$tn.1 "
|
||||||
catchsql {$sql}
|
catchsql {$sql}
|
||||||
" [lindex {{0 {}} {1 {foreign key constraint failed}}} $isError]
|
" [lindex {{0 {}} {1 {FOREIGN KEY constraint failed}}} $isError]
|
||||||
|
|
||||||
do_test e_fkey-15.$tn.2 {
|
do_test e_fkey-15.$tn.2 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -557,10 +557,10 @@ do_test e_fkey-16.2 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-16.3 {
|
do_test e_fkey-16.3 {
|
||||||
catchsql { UPDATE t2 SET b = 'two' WHERE rowid = 1 }
|
catchsql { UPDATE t2 SET b = 'two' WHERE rowid = 1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-16.4 {
|
do_test e_fkey-16.4 {
|
||||||
catchsql { DELETE FROM t1 WHERE rowid = 1 }
|
catchsql { DELETE FROM t1 WHERE rowid = 1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# Specifically, test that when comparing child and parent key values the
|
# Specifically, test that when comparing child and parent key values the
|
||||||
@ -592,7 +592,7 @@ do_test e_fkey-17.3 {
|
|||||||
} {integer integer text}
|
} {integer integer text}
|
||||||
do_test e_fkey-17.4 {
|
do_test e_fkey-17.4 {
|
||||||
catchsql { DELETE FROM t1 WHERE rowid = 2 }
|
catchsql { DELETE FROM t1 WHERE rowid = 2 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
### SECTION 3: Required and Suggested Database Indexes
|
### SECTION 3: Required and Suggested Database Indexes
|
||||||
@ -896,7 +896,7 @@ do_test e_fkey-23.1 {
|
|||||||
proc test_efkey_60 {tn isError sql} {
|
proc test_efkey_60 {tn isError sql} {
|
||||||
do_test e_fkey-23.$tn "
|
do_test e_fkey-23.$tn "
|
||||||
catchsql {$sql}
|
catchsql {$sql}
|
||||||
" [lindex {{0 {}} {1 {foreign key constraint failed}}} $isError]
|
" [lindex {{0 {}} {1 {FOREIGN KEY constraint failed}}} $isError]
|
||||||
}
|
}
|
||||||
|
|
||||||
test_efkey_60 2 1 "INSERT INTO c1 VALUES(239, 231)"
|
test_efkey_60 2 1 "INSERT INTO c1 VALUES(239, 231)"
|
||||||
@ -933,7 +933,7 @@ do_test e_fkey-24.1 {
|
|||||||
proc test_efkey_61 {tn isError sql} {
|
proc test_efkey_61 {tn isError sql} {
|
||||||
do_test e_fkey-24.$tn "
|
do_test e_fkey-24.$tn "
|
||||||
catchsql {$sql}
|
catchsql {$sql}
|
||||||
" [lindex {{0 {}} {1 {foreign key constraint failed}}} $isError]
|
" [lindex {{0 {}} {1 {FOREIGN KEY constraint failed}}} $isError]
|
||||||
}
|
}
|
||||||
foreach {tn c} [list 2 c1 3 c2 4 c3] {
|
foreach {tn c} [list 2 c1 3 c2 4 c3] {
|
||||||
test_efkey_61 $tn.1 1 "INSERT INTO $c VALUES(1, 2)"
|
test_efkey_61 $tn.1 1 "INSERT INTO $c VALUES(1, 2)"
|
||||||
@ -998,7 +998,7 @@ do_test e_fkey-25.5 {
|
|||||||
concat \
|
concat \
|
||||||
[execsql { SELECT rowid FROM track WHERE trackartist = 5 }] \
|
[execsql { SELECT rowid FROM track WHERE trackartist = 5 }] \
|
||||||
[catchsql { DELETE FROM artist WHERE artistid = 5 }]
|
[catchsql { DELETE FROM artist WHERE artistid = 5 }]
|
||||||
} {1 1 {foreign key constraint failed}}
|
} {1 1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test e_fkey-25.6 {
|
do_test e_fkey-25.6 {
|
||||||
concat \
|
concat \
|
||||||
@ -1010,7 +1010,7 @@ do_test e_fkey-25.7 {
|
|||||||
concat \
|
concat \
|
||||||
[execsql { SELECT rowid FROM track WHERE trackartist = 6 }] \
|
[execsql { SELECT rowid FROM track WHERE trackartist = 6 }] \
|
||||||
[catchsql { DELETE FROM artist WHERE artistid = 6 }]
|
[catchsql { DELETE FROM artist WHERE artistid = 6 }]
|
||||||
} {2 1 {foreign key constraint failed}}
|
} {2 1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# EVIDENCE-OF: R-47936-10044 Or, more generally:
|
# EVIDENCE-OF: R-47936-10044 Or, more generally:
|
||||||
@ -1199,7 +1199,7 @@ do_test e_fkey-29.3 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO song VALUES(2, 'Elvis Presley', 'Elvis Is Back!', 'Fever');
|
INSERT INTO song VALUES(2, 'Elvis Presley', 'Elvis Is Back!', 'Fever');
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -1240,7 +1240,7 @@ do_test e_fkey-31.1 {
|
|||||||
do_test e_fkey-31.2 {
|
do_test e_fkey-31.2 {
|
||||||
# Execute a statement that violates the immediate FK constraint.
|
# Execute a statement that violates the immediate FK constraint.
|
||||||
catchsql { INSERT INTO prince VALUES(1, 2) }
|
catchsql { INSERT INTO prince VALUES(1, 2) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test e_fkey-31.3 {
|
do_test e_fkey-31.3 {
|
||||||
# This time, use a trigger to fix the constraint violation before the
|
# This time, use a trigger to fix the constraint violation before the
|
||||||
@ -1265,7 +1265,7 @@ do_test e_fkey-31.4 {
|
|||||||
DROP TRIGGER kt;
|
DROP TRIGGER kt;
|
||||||
}
|
}
|
||||||
catchsql { INSERT INTO prince VALUES(3, 4) }
|
catchsql { INSERT INTO prince VALUES(3, 4) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-31.5 {
|
do_test e_fkey-31.5 {
|
||||||
execsql {
|
execsql {
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@ -1296,7 +1296,7 @@ do_test e_fkey-31.5 {
|
|||||||
proc test_efkey_34 {tn isError sql} {
|
proc test_efkey_34 {tn isError sql} {
|
||||||
do_test e_fkey-32.$tn "
|
do_test e_fkey-32.$tn "
|
||||||
catchsql {$sql}
|
catchsql {$sql}
|
||||||
" [lindex {{0 {}} {1 {foreign key constraint failed}}} $isError]
|
" [lindex {{0 {}} {1 {FOREIGN KEY constraint failed}}} $isError]
|
||||||
}
|
}
|
||||||
drop_all_tables
|
drop_all_tables
|
||||||
|
|
||||||
@ -1327,7 +1327,7 @@ drop_all_tables
|
|||||||
proc test_efkey_35 {tn isError sql} {
|
proc test_efkey_35 {tn isError sql} {
|
||||||
do_test e_fkey-33.$tn "
|
do_test e_fkey-33.$tn "
|
||||||
catchsql {$sql}
|
catchsql {$sql}
|
||||||
" [lindex {{0 {}} {1 {foreign key constraint failed}}} $isError]
|
" [lindex {{0 {}} {1 {FOREIGN KEY constraint failed}}} $isError]
|
||||||
}
|
}
|
||||||
do_test e_fkey-33.1 {
|
do_test e_fkey-33.1 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -1417,7 +1417,7 @@ do_test e_fkey-34.1 {
|
|||||||
|
|
||||||
proc test_efkey_29 {tn sql isError} {
|
proc test_efkey_29 {tn sql isError} {
|
||||||
do_test e_fkey-34.$tn "catchsql {$sql}" [
|
do_test e_fkey-34.$tn "catchsql {$sql}" [
|
||||||
lindex {{0 {}} {1 {foreign key constraint failed}}} $isError
|
lindex {{0 {}} {1 {FOREIGN KEY constraint failed}}} $isError
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
test_efkey_29 2 "BEGIN" 0
|
test_efkey_29 2 "BEGIN" 0
|
||||||
@ -1491,7 +1491,7 @@ do_test e_fkey-35.2 {
|
|||||||
INSERT INTO track VALUES(1, 'White Christmas', 5);
|
INSERT INTO track VALUES(1, 'White Christmas', 5);
|
||||||
}
|
}
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-35.3 {
|
do_test e_fkey-35.3 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO artist VALUES(5, 'Bing Crosby');
|
INSERT INTO artist VALUES(5, 'Bing Crosby');
|
||||||
@ -1528,7 +1528,7 @@ do_test e_fkey-36.2 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-36.3 {
|
do_test e_fkey-36.3 {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-36.4 {
|
do_test e_fkey-36.4 {
|
||||||
execsql {
|
execsql {
|
||||||
UPDATE t1 SET a = 5 WHERE a = 4;
|
UPDATE t1 SET a = 5 WHERE a = 4;
|
||||||
@ -1558,7 +1558,7 @@ do_test e_fkey-37.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-37.2 {
|
do_test e_fkey-37.2 {
|
||||||
catchsql {RELEASE one}
|
catchsql {RELEASE one}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-37.3 {
|
do_test e_fkey-37.3 {
|
||||||
execsql {
|
execsql {
|
||||||
UPDATE t1 SET a = 7 WHERE a = 6;
|
UPDATE t1 SET a = 7 WHERE a = 6;
|
||||||
@ -1575,7 +1575,7 @@ do_test e_fkey-37.4 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-37.5 {
|
do_test e_fkey-37.5 {
|
||||||
catchsql {RELEASE one}
|
catchsql {RELEASE one}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-37.6 {
|
do_test e_fkey-37.6 {
|
||||||
execsql {ROLLBACK TO one ; RELEASE one}
|
execsql {ROLLBACK TO one ; RELEASE one}
|
||||||
} {}
|
} {}
|
||||||
@ -1606,7 +1606,7 @@ do_test e_fkey-38.2 {
|
|||||||
} {1 1 2 2 3 3 4 4 5 6}
|
} {1 1 2 2 3 3 4 4 5 6}
|
||||||
do_test e_fkey-38.3 {
|
do_test e_fkey-38.3 {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-38.4 {
|
do_test e_fkey-38.4 {
|
||||||
execsql {
|
execsql {
|
||||||
ROLLBACK TO one;
|
ROLLBACK TO one;
|
||||||
@ -1627,11 +1627,11 @@ do_test e_fkey-38.5 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-38.6 {
|
do_test e_fkey-38.6 {
|
||||||
catchsql {RELEASE a}
|
catchsql {RELEASE a}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-38.7 {
|
do_test e_fkey-38.7 {
|
||||||
execsql {ROLLBACK TO c}
|
execsql {ROLLBACK TO c}
|
||||||
catchsql {RELEASE a}
|
catchsql {RELEASE a}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-38.8 {
|
do_test e_fkey-38.8 {
|
||||||
execsql {
|
execsql {
|
||||||
ROLLBACK TO b;
|
ROLLBACK TO b;
|
||||||
@ -1782,7 +1782,7 @@ do_test e_fkey-41.2 {
|
|||||||
} {j k l m}
|
} {j k l m}
|
||||||
do_test e_fkey-41.3 {
|
do_test e_fkey-41.3 {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-41.4 {
|
do_test e_fkey-41.4 {
|
||||||
execsql ROLLBACK
|
execsql ROLLBACK
|
||||||
} {}
|
} {}
|
||||||
@ -1820,10 +1820,10 @@ do_test e_fkey-41.2 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-41.3 {
|
do_test e_fkey-41.3 {
|
||||||
catchsql { DELETE FROM parent WHERE p1 = 'a' }
|
catchsql { DELETE FROM parent WHERE p1 = 'a' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-41.4 {
|
do_test e_fkey-41.4 {
|
||||||
catchsql { UPDATE parent SET p2 = 'e' WHERE p1 = 'c' }
|
catchsql { UPDATE parent SET p2 = 'e' WHERE p1 = 'c' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# Test that RESTRICT is slightly different from NO ACTION for IMMEDIATE
|
# Test that RESTRICT is slightly different from NO ACTION for IMMEDIATE
|
||||||
@ -1857,7 +1857,7 @@ do_test e_fkey-42.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-42.2 {
|
do_test e_fkey-42.2 {
|
||||||
catchsql { UPDATE parent SET x = 'key one' WHERE x = 'key1' }
|
catchsql { UPDATE parent SET x = 'key one' WHERE x = 'key1' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-42.3 {
|
do_test e_fkey-42.3 {
|
||||||
execsql {
|
execsql {
|
||||||
UPDATE parent SET x = 'key two' WHERE x = 'key2';
|
UPDATE parent SET x = 'key two' WHERE x = 'key2';
|
||||||
@ -1885,7 +1885,7 @@ do_test e_fkey-42.4 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-42.5 {
|
do_test e_fkey-42.5 {
|
||||||
catchsql { DELETE FROM parent WHERE x = 'key1' }
|
catchsql { DELETE FROM parent WHERE x = 'key1' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-42.6 {
|
do_test e_fkey-42.6 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM parent WHERE x = 'key2';
|
DELETE FROM parent WHERE x = 'key2';
|
||||||
@ -1908,7 +1908,7 @@ do_test e_fkey-42.7 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-42.8 {
|
do_test e_fkey-42.8 {
|
||||||
catchsql { REPLACE INTO parent VALUES('key1') }
|
catchsql { REPLACE INTO parent VALUES('key1') }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-42.9 {
|
do_test e_fkey-42.9 {
|
||||||
execsql {
|
execsql {
|
||||||
REPLACE INTO parent VALUES('key2');
|
REPLACE INTO parent VALUES('key2');
|
||||||
@ -1944,13 +1944,13 @@ do_test e_fkey-43.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-43.2 {
|
do_test e_fkey-43.2 {
|
||||||
catchsql { UPDATE parent SET x = 'key one' WHERE x = 'key1' }
|
catchsql { UPDATE parent SET x = 'key one' WHERE x = 'key1' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-43.3 {
|
do_test e_fkey-43.3 {
|
||||||
execsql { UPDATE parent SET x = 'key two' WHERE x = 'key2' }
|
execsql { UPDATE parent SET x = 'key two' WHERE x = 'key2' }
|
||||||
} {}
|
} {}
|
||||||
do_test e_fkey-43.4 {
|
do_test e_fkey-43.4 {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-43.5 {
|
do_test e_fkey-43.5 {
|
||||||
execsql {
|
execsql {
|
||||||
UPDATE child2 SET c = 'key two';
|
UPDATE child2 SET c = 'key two';
|
||||||
@ -1978,13 +1978,13 @@ do_test e_fkey-43.6 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-43.7 {
|
do_test e_fkey-43.7 {
|
||||||
catchsql { DELETE FROM parent WHERE x = 'key1' }
|
catchsql { DELETE FROM parent WHERE x = 'key1' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-43.8 {
|
do_test e_fkey-43.8 {
|
||||||
execsql { DELETE FROM parent WHERE x = 'key2' }
|
execsql { DELETE FROM parent WHERE x = 'key2' }
|
||||||
} {}
|
} {}
|
||||||
do_test e_fkey-43.9 {
|
do_test e_fkey-43.9 {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-43.10 {
|
do_test e_fkey-43.10 {
|
||||||
execsql {
|
execsql {
|
||||||
UPDATE child2 SET c = NULL;
|
UPDATE child2 SET c = NULL;
|
||||||
@ -2240,7 +2240,7 @@ do_test e_fkey-49.3 {
|
|||||||
} {ONE two three}
|
} {ONE two three}
|
||||||
do_test e_fkey-49.4 {
|
do_test e_fkey-49.4 {
|
||||||
catchsql { UPDATE parent SET a = '' WHERE a = 'oNe' }
|
catchsql { UPDATE parent SET a = '' WHERE a = 'oNe' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -2275,7 +2275,7 @@ do_test e_fkey-50.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-50.2 {
|
do_test e_fkey-50.2 {
|
||||||
catchsql { DELETE FROM artist WHERE artistname = 'Sammy Davis Jr.' }
|
catchsql { DELETE FROM artist WHERE artistname = 'Sammy Davis Jr.' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-50.3 {
|
do_test e_fkey-50.3 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO artist VALUES(0, 'Unknown Artist');
|
INSERT INTO artist VALUES(0, 'Unknown Artist');
|
||||||
@ -2639,7 +2639,7 @@ do_test e_fkey-58.1 {
|
|||||||
}
|
}
|
||||||
execsql { INSERT INTO c5 VALUES('a', 'b') }
|
execsql { INSERT INTO c5 VALUES('a', 'b') }
|
||||||
catchsql { DROP TABLE p }
|
catchsql { DROP TABLE p }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-58.2 {
|
do_test e_fkey-58.2 {
|
||||||
execsql { SELECT * FROM p }
|
execsql { SELECT * FROM p }
|
||||||
} {a b}
|
} {a b}
|
||||||
@ -2648,7 +2648,7 @@ do_test e_fkey-58.3 {
|
|||||||
BEGIN;
|
BEGIN;
|
||||||
DROP TABLE p;
|
DROP TABLE p;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-58.4 {
|
do_test e_fkey-58.4 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM p;
|
SELECT * FROM p;
|
||||||
@ -2682,11 +2682,11 @@ do_test e_fkey-59.2 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-59.3 {
|
do_test e_fkey-59.3 {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-59.4 {
|
do_test e_fkey-59.4 {
|
||||||
execsql { CREATE TABLE p(a, b, PRIMARY KEY(a, b)) }
|
execsql { CREATE TABLE p(a, b, PRIMARY KEY(a, b)) }
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-59.5 {
|
do_test e_fkey-59.5 {
|
||||||
execsql { INSERT INTO p VALUES('a', 'b') }
|
execsql { INSERT INTO p VALUES('a', 'b') }
|
||||||
execsql COMMIT
|
execsql COMMIT
|
||||||
@ -2849,7 +2849,7 @@ foreach zMatch [list SIMPLE PARTIAL FULL Simple parTIAL FuLL ] {
|
|||||||
# Check that the FK is enforced properly if there are no NULL values
|
# Check that the FK is enforced properly if there are no NULL values
|
||||||
# in the child key columns.
|
# in the child key columns.
|
||||||
catchsql { INSERT INTO c VALUES('a', 2, 4) }
|
catchsql { INSERT INTO c VALUES('a', 2, 4) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -2879,13 +2879,13 @@ do_test e_fkey-62.3 {
|
|||||||
} {}
|
} {}
|
||||||
do_test e_fkey-62.4 {
|
do_test e_fkey-62.4 {
|
||||||
catchsql { INSERT INTO ci VALUES('x', 'y') }
|
catchsql { INSERT INTO ci VALUES('x', 'y') }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-62.5 {
|
do_test e_fkey-62.5 {
|
||||||
catchsql { INSERT INTO cd VALUES('x', 'y') }
|
catchsql { INSERT INTO cd VALUES('x', 'y') }
|
||||||
} {0 {}}
|
} {0 {}}
|
||||||
do_test e_fkey-62.6 {
|
do_test e_fkey-62.6 {
|
||||||
catchsql { COMMIT }
|
catchsql { COMMIT }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test e_fkey-62.7 {
|
do_test e_fkey-62.7 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM cd;
|
DELETE FROM cd;
|
||||||
|
@ -371,22 +371,22 @@ do_execsql_test e_insert-4.1.0 {
|
|||||||
INSERT INTO a4 VALUES(3, 'a');
|
INSERT INTO a4 VALUES(3, 'a');
|
||||||
} {}
|
} {}
|
||||||
foreach {tn sql error ac data } {
|
foreach {tn sql error ac data } {
|
||||||
1.1 "INSERT INTO a4 VALUES(2,'b')" {column c is not unique} 1 {1 a 2 a 3 a}
|
1.1 "INSERT INTO a4 VALUES(2,'b')" {UNIQUE constraint failed: a4.c} 1 {1 a 2 a 3 a}
|
||||||
1.2 "INSERT OR REPLACE INTO a4 VALUES(2, 'b')" {} 1 {1 a 3 a 2 b}
|
1.2 "INSERT OR REPLACE INTO a4 VALUES(2, 'b')" {} 1 {1 a 3 a 2 b}
|
||||||
1.3 "INSERT OR IGNORE INTO a4 VALUES(3, 'c')" {} 1 {1 a 3 a 2 b}
|
1.3 "INSERT OR IGNORE INTO a4 VALUES(3, 'c')" {} 1 {1 a 3 a 2 b}
|
||||||
1.4 "BEGIN" {} 0 {1 a 3 a 2 b}
|
1.4 "BEGIN" {} 0 {1 a 3 a 2 b}
|
||||||
1.5 "INSERT INTO a4 VALUES(1, 'd')" {column c is not unique} 0 {1 a 3 a 2 b}
|
1.5 "INSERT INTO a4 VALUES(1, 'd')" {UNIQUE constraint failed: a4.c} 0 {1 a 3 a 2 b}
|
||||||
1.6 "INSERT OR ABORT INTO a4 VALUES(1, 'd')"
|
1.6 "INSERT OR ABORT INTO a4 VALUES(1, 'd')"
|
||||||
{column c is not unique} 0 {1 a 3 a 2 b}
|
{UNIQUE constraint failed: a4.c} 0 {1 a 3 a 2 b}
|
||||||
1.7 "INSERT OR ROLLBACK INTO a4 VALUES(1, 'd')"
|
1.7 "INSERT OR ROLLBACK INTO a4 VALUES(1, 'd')"
|
||||||
{column c is not unique} 1 {1 a 3 a 2 b}
|
{UNIQUE constraint failed: a4.c} 1 {1 a 3 a 2 b}
|
||||||
1.8 "INSERT INTO a4 SELECT 4, 'e' UNION ALL SELECT 3, 'e'"
|
1.8 "INSERT INTO a4 SELECT 4, 'e' UNION ALL SELECT 3, 'e'"
|
||||||
{column c is not unique} 1 {1 a 3 a 2 b}
|
{UNIQUE constraint failed: a4.c} 1 {1 a 3 a 2 b}
|
||||||
1.9 "INSERT OR FAIL INTO a4 SELECT 4, 'e' UNION ALL SELECT 3, 'e'"
|
1.9 "INSERT OR FAIL INTO a4 SELECT 4, 'e' UNION ALL SELECT 3, 'e'"
|
||||||
{column c is not unique} 1 {1 a 3 a 2 b 4 e}
|
{UNIQUE constraint failed: a4.c} 1 {1 a 3 a 2 b 4 e}
|
||||||
|
|
||||||
2.1 "INSERT INTO a4 VALUES(2,'f')"
|
2.1 "INSERT INTO a4 VALUES(2,'f')"
|
||||||
{column c is not unique} 1 {1 a 3 a 2 b 4 e}
|
{UNIQUE constraint failed: a4.c} 1 {1 a 3 a 2 b 4 e}
|
||||||
2.2 "REPLACE INTO a4 VALUES(2, 'f')" {} 1 {1 a 3 a 4 e 2 f}
|
2.2 "REPLACE INTO a4 VALUES(2, 'f')" {} 1 {1 a 3 a 4 e 2 f}
|
||||||
} {
|
} {
|
||||||
do_catchsql_test e_insert-4.1.$tn.1 $sql [list [expr {$error!=""}] $error]
|
do_catchsql_test e_insert-4.1.$tn.1 $sql [list [expr {$error!=""}] $error]
|
||||||
|
@ -278,30 +278,30 @@ do_execsql_test e_update-1.8.0 {
|
|||||||
} {}
|
} {}
|
||||||
foreach {tn sql error ac data } {
|
foreach {tn sql error ac data } {
|
||||||
1 "UPDATE t3 SET b='one' WHERE a=3"
|
1 "UPDATE t3 SET b='one' WHERE a=3"
|
||||||
{column b is not unique} 1 {1 one 2 two 3 three 4 four}
|
{UNIQUE constraint failed: t3.b} 1 {1 one 2 two 3 three 4 four}
|
||||||
|
|
||||||
2 "UPDATE OR REPLACE t3 SET b='one' WHERE a=3"
|
2 "UPDATE OR REPLACE t3 SET b='one' WHERE a=3"
|
||||||
{} 1 {2 two 3 one 4 four}
|
{} 1 {2 two 3 one 4 four}
|
||||||
|
|
||||||
3 "UPDATE OR FAIL t3 SET b='three'"
|
3 "UPDATE OR FAIL t3 SET b='three'"
|
||||||
{column b is not unique} 1 {2 three 3 one 4 four}
|
{UNIQUE constraint failed: t3.b} 1 {2 three 3 one 4 four}
|
||||||
|
|
||||||
4 "UPDATE OR IGNORE t3 SET b='three' WHERE a=3"
|
4 "UPDATE OR IGNORE t3 SET b='three' WHERE a=3"
|
||||||
{} 1 {2 three 3 one 4 four}
|
{} 1 {2 three 3 one 4 four}
|
||||||
|
|
||||||
5 "UPDATE OR ABORT t3 SET b='three' WHERE a=3"
|
5 "UPDATE OR ABORT t3 SET b='three' WHERE a=3"
|
||||||
{column b is not unique} 1 {2 three 3 one 4 four}
|
{UNIQUE constraint failed: t3.b} 1 {2 three 3 one 4 four}
|
||||||
|
|
||||||
6 "BEGIN" {} 0 {2 three 3 one 4 four}
|
6 "BEGIN" {} 0 {2 three 3 one 4 four}
|
||||||
|
|
||||||
7 "UPDATE t3 SET b='three' WHERE a=3"
|
7 "UPDATE t3 SET b='three' WHERE a=3"
|
||||||
{column b is not unique} 0 {2 three 3 one 4 four}
|
{UNIQUE constraint failed: t3.b} 0 {2 three 3 one 4 four}
|
||||||
|
|
||||||
8 "UPDATE OR ABORT t3 SET b='three' WHERE a=3"
|
8 "UPDATE OR ABORT t3 SET b='three' WHERE a=3"
|
||||||
{column b is not unique} 0 {2 three 3 one 4 four}
|
{UNIQUE constraint failed: t3.b} 0 {2 three 3 one 4 four}
|
||||||
|
|
||||||
9 "UPDATE OR FAIL t3 SET b='two'"
|
9 "UPDATE OR FAIL t3 SET b='two'"
|
||||||
{column b is not unique} 0 {2 two 3 one 4 four}
|
{UNIQUE constraint failed: t3.b} 0 {2 two 3 one 4 four}
|
||||||
|
|
||||||
10 "UPDATE OR IGNORE t3 SET b='four' WHERE a=3"
|
10 "UPDATE OR IGNORE t3 SET b='four' WHERE a=3"
|
||||||
{} 0 {2 two 3 one 4 four}
|
{} 0 {2 two 3 one 4 four}
|
||||||
@ -310,7 +310,7 @@ foreach {tn sql error ac data } {
|
|||||||
{} 0 {2 two 3 four}
|
{} 0 {2 two 3 four}
|
||||||
|
|
||||||
12 "UPDATE OR ROLLBACK t3 SET b='four'"
|
12 "UPDATE OR ROLLBACK t3 SET b='four'"
|
||||||
{column b is not unique} 1 {2 three 3 one 4 four}
|
{UNIQUE constraint failed: t3.b} 1 {2 three 3 one 4 four}
|
||||||
} {
|
} {
|
||||||
do_catchsql_test e_update-1.8.$tn.1 $sql [list [expr {$error!=""}] $error]
|
do_catchsql_test e_update-1.8.$tn.1 $sql [list [expr {$error!=""}] $error]
|
||||||
do_execsql_test e_update-1.8.$tn.2 {SELECT * FROM t3} [list {*}$data]
|
do_execsql_test e_update-1.8.$tn.2 {SELECT * FROM t3} [list {*}$data]
|
||||||
|
@ -78,14 +78,14 @@ do_test 2.2 {
|
|||||||
error_messages "INSERT INTO t1 VALUES('ghi', 'def')"
|
error_messages "INSERT INTO t1 VALUES('ghi', 'def')"
|
||||||
} [list {*}{
|
} [list {*}{
|
||||||
SQLITE_ERROR {SQL logic error or missing database}
|
SQLITE_ERROR {SQL logic error or missing database}
|
||||||
SQLITE_CONSTRAINT {column b is not unique}
|
SQLITE_CONSTRAINT {UNIQUE constraint failed: t1.b}
|
||||||
}]
|
}]
|
||||||
verify_ex_errcode 2.2b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode 2.2b SQLITE_CONSTRAINT_UNIQUE
|
||||||
do_test 2.3 {
|
do_test 2.3 {
|
||||||
error_messages_v2 "INSERT INTO t1 VALUES('ghi', 'def')"
|
error_messages_v2 "INSERT INTO t1 VALUES('ghi', 'def')"
|
||||||
} [list {*}{
|
} [list {*}{
|
||||||
SQLITE_CONSTRAINT {column b is not unique}
|
SQLITE_CONSTRAINT {UNIQUE constraint failed: t1.b}
|
||||||
SQLITE_CONSTRAINT {column b is not unique}
|
SQLITE_CONSTRAINT {UNIQUE constraint failed: t1.b}
|
||||||
}]
|
}]
|
||||||
verify_ex_errcode 2.3b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode 2.3b SQLITE_CONSTRAINT_UNIQUE
|
||||||
|
|
||||||
|
150
test/fkey2.test
150
test/fkey2.test
@ -104,38 +104,38 @@ set FkeySimpleSchema {
|
|||||||
|
|
||||||
|
|
||||||
set FkeySimpleTests {
|
set FkeySimpleTests {
|
||||||
1.1 "INSERT INTO t2 VALUES(1, 3)" {1 {foreign key constraint failed}}
|
1.1 "INSERT INTO t2 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.2 "INSERT INTO t1 VALUES(1, 2)" {0 {}}
|
1.2 "INSERT INTO t1 VALUES(1, 2)" {0 {}}
|
||||||
1.3 "INSERT INTO t2 VALUES(1, 3)" {0 {}}
|
1.3 "INSERT INTO t2 VALUES(1, 3)" {0 {}}
|
||||||
1.4 "INSERT INTO t2 VALUES(2, 4)" {1 {foreign key constraint failed}}
|
1.4 "INSERT INTO t2 VALUES(2, 4)" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.5 "INSERT INTO t2 VALUES(NULL, 4)" {0 {}}
|
1.5 "INSERT INTO t2 VALUES(NULL, 4)" {0 {}}
|
||||||
1.6 "UPDATE t2 SET c=2 WHERE d=4" {1 {foreign key constraint failed}}
|
1.6 "UPDATE t2 SET c=2 WHERE d=4" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.7 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
|
1.7 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
|
||||||
1.9 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
|
1.9 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
|
||||||
1.10 "UPDATE t2 SET c=NULL WHERE d=4" {0 {}}
|
1.10 "UPDATE t2 SET c=NULL WHERE d=4" {0 {}}
|
||||||
1.11 "DELETE FROM t1 WHERE a=1" {1 {foreign key constraint failed}}
|
1.11 "DELETE FROM t1 WHERE a=1" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.12 "UPDATE t1 SET a = 2" {1 {foreign key constraint failed}}
|
1.12 "UPDATE t1 SET a = 2" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.13 "UPDATE t1 SET a = 1" {0 {}}
|
1.13 "UPDATE t1 SET a = 1" {0 {}}
|
||||||
|
|
||||||
2.1 "INSERT INTO t4 VALUES(1, 3)" {1 {foreign key constraint failed}}
|
2.1 "INSERT INTO t4 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
|
||||||
2.2 "INSERT INTO t3 VALUES(1, 2)" {0 {}}
|
2.2 "INSERT INTO t3 VALUES(1, 2)" {0 {}}
|
||||||
2.3 "INSERT INTO t4 VALUES(1, 3)" {0 {}}
|
2.3 "INSERT INTO t4 VALUES(1, 3)" {0 {}}
|
||||||
|
|
||||||
4.1 "INSERT INTO t8 VALUES(1, 3)" {1 {foreign key constraint failed}}
|
4.1 "INSERT INTO t8 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.2 "INSERT INTO t7 VALUES(2, 1)" {0 {}}
|
4.2 "INSERT INTO t7 VALUES(2, 1)" {0 {}}
|
||||||
4.3 "INSERT INTO t8 VALUES(1, 3)" {0 {}}
|
4.3 "INSERT INTO t8 VALUES(1, 3)" {0 {}}
|
||||||
4.4 "INSERT INTO t8 VALUES(2, 4)" {1 {foreign key constraint failed}}
|
4.4 "INSERT INTO t8 VALUES(2, 4)" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.5 "INSERT INTO t8 VALUES(NULL, 4)" {0 {}}
|
4.5 "INSERT INTO t8 VALUES(NULL, 4)" {0 {}}
|
||||||
4.6 "UPDATE t8 SET c=2 WHERE d=4" {1 {foreign key constraint failed}}
|
4.6 "UPDATE t8 SET c=2 WHERE d=4" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.7 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
|
4.7 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
|
||||||
4.9 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
|
4.9 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
|
||||||
4.10 "UPDATE t8 SET c=NULL WHERE d=4" {0 {}}
|
4.10 "UPDATE t8 SET c=NULL WHERE d=4" {0 {}}
|
||||||
4.11 "DELETE FROM t7 WHERE b=1" {1 {foreign key constraint failed}}
|
4.11 "DELETE FROM t7 WHERE b=1" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.12 "UPDATE t7 SET b = 2" {1 {foreign key constraint failed}}
|
4.12 "UPDATE t7 SET b = 2" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.13 "UPDATE t7 SET b = 1" {0 {}}
|
4.13 "UPDATE t7 SET b = 1" {0 {}}
|
||||||
4.14 "INSERT INTO t8 VALUES('a', 'b')" {1 {foreign key constraint failed}}
|
4.14 "INSERT INTO t8 VALUES('a', 'b')" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.15 "UPDATE t7 SET b = 5" {1 {foreign key constraint failed}}
|
4.15 "UPDATE t7 SET b = 5" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.16 "UPDATE t7 SET rowid = 5" {1 {foreign key constraint failed}}
|
4.16 "UPDATE t7 SET rowid = 5" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.17 "UPDATE t7 SET a = 10" {0 {}}
|
4.17 "UPDATE t7 SET a = 10" {0 {}}
|
||||||
|
|
||||||
5.1 "INSERT INTO t9 VALUES(1, 3)" {1 {no such table: main.nosuchtable}}
|
5.1 "INSERT INTO t9 VALUES(1, 3)" {1 {no such table: main.nosuchtable}}
|
||||||
@ -215,7 +215,7 @@ do_test fkey2-1.5.1 {
|
|||||||
} {35.0 text}
|
} {35.0 text}
|
||||||
do_test fkey2-1.5.2 {
|
do_test fkey2-1.5.2 {
|
||||||
catchsql { DELETE FROM i }
|
catchsql { DELETE FROM i }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
# Same test using a regular primary key with integer affinity.
|
# Same test using a regular primary key with integer affinity.
|
||||||
drop_all_tables
|
drop_all_tables
|
||||||
@ -231,7 +231,7 @@ do_test fkey2-1.6.1 {
|
|||||||
} {35.0 text 35 integer}
|
} {35.0 text 35 integer}
|
||||||
do_test fkey2-1.6.2 {
|
do_test fkey2-1.6.2 {
|
||||||
catchsql { DELETE FROM i }
|
catchsql { DELETE FROM i }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
# Use a collation sequence on the parent key.
|
# Use a collation sequence on the parent key.
|
||||||
drop_all_tables
|
drop_all_tables
|
||||||
@ -243,7 +243,7 @@ do_test fkey2-1.7.1 {
|
|||||||
INSERT INTO j VALUES('sqlite');
|
INSERT INTO j VALUES('sqlite');
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM i }
|
catchsql { DELETE FROM i }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
# Use the parent key collation even if it is default and the child key
|
# Use the parent key collation even if it is default and the child key
|
||||||
# has an explicit value.
|
# has an explicit value.
|
||||||
@ -255,7 +255,7 @@ do_test fkey2-1.7.2 {
|
|||||||
INSERT INTO i VALUES('SQLite');
|
INSERT INTO i VALUES('SQLite');
|
||||||
}
|
}
|
||||||
catchsql { INSERT INTO j VALUES('sqlite') }
|
catchsql { INSERT INTO j VALUES('sqlite') }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-1.7.3 {
|
do_test fkey2-1.7.3 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO i VALUES('sqlite');
|
INSERT INTO i VALUES('sqlite');
|
||||||
@ -263,7 +263,7 @@ do_test fkey2-1.7.3 {
|
|||||||
DELETE FROM i WHERE i = 'SQLite';
|
DELETE FROM i WHERE i = 'SQLite';
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM i WHERE i = 'sqlite' }
|
catchsql { DELETE FROM i WHERE i = 'sqlite' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# This section (test cases fkey2-2.*) contains tests to check that the
|
# This section (test cases fkey2-2.*) contains tests to check that the
|
||||||
@ -271,7 +271,7 @@ do_test fkey2-1.7.3 {
|
|||||||
#
|
#
|
||||||
proc fkey2-2-test {tn nocommit sql {res {}}} {
|
proc fkey2-2-test {tn nocommit sql {res {}}} {
|
||||||
if {$res eq "FKV"} {
|
if {$res eq "FKV"} {
|
||||||
set expected {1 {foreign key constraint failed}}
|
set expected {1 {FOREIGN KEY constraint failed}}
|
||||||
} else {
|
} else {
|
||||||
set expected [list 0 $res]
|
set expected [list 0 $res]
|
||||||
}
|
}
|
||||||
@ -279,7 +279,7 @@ proc fkey2-2-test {tn nocommit sql {res {}}} {
|
|||||||
if {$nocommit} {
|
if {$nocommit} {
|
||||||
do_test fkey2-2.${tn}c {
|
do_test fkey2-2.${tn}c {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ fkey2-2-test 65 1 "INSERT INTO leaf VALUES('b', 2)"
|
|||||||
fkey2-2-test 66 1 "INSERT INTO leaf VALUES('c', 1)"
|
fkey2-2-test 66 1 "INSERT INTO leaf VALUES('c', 1)"
|
||||||
do_test fkey2-2-test-67 {
|
do_test fkey2-2-test-67 {
|
||||||
catchsql "INSERT INTO node SELECT parent, 3 FROM leaf"
|
catchsql "INSERT INTO node SELECT parent, 3 FROM leaf"
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: node.nodeid}}
|
||||||
fkey2-2-test 68 0 "COMMIT" FKV
|
fkey2-2-test 68 0 "COMMIT" FKV
|
||||||
fkey2-2-test 69 1 "INSERT INTO node VALUES(1, NULL)"
|
fkey2-2-test 69 1 "INSERT INTO node VALUES(1, NULL)"
|
||||||
fkey2-2-test 70 0 "INSERT INTO node VALUES(2, NULL)"
|
fkey2-2-test 70 0 "INSERT INTO node VALUES(2, NULL)"
|
||||||
@ -417,14 +417,14 @@ do_test fkey2-3.1.2 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-3.1.3 {
|
do_test fkey2-3.1.3 {
|
||||||
catchsql { UPDATE ab SET a = 5 }
|
catchsql { UPDATE ab SET a = 5 }
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: ef}}
|
||||||
do_test fkey2-3.1.4 {
|
do_test fkey2-3.1.4 {
|
||||||
execsql { SELECT * FROM ab }
|
execsql { SELECT * FROM ab }
|
||||||
} {1 b}
|
} {1 b}
|
||||||
do_test fkey2-3.1.4 {
|
do_test fkey2-3.1.4 {
|
||||||
execsql BEGIN;
|
execsql BEGIN;
|
||||||
catchsql { UPDATE ab SET a = 5 }
|
catchsql { UPDATE ab SET a = 5 }
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: ef}}
|
||||||
do_test fkey2-3.1.5 {
|
do_test fkey2-3.1.5 {
|
||||||
execsql COMMIT;
|
execsql COMMIT;
|
||||||
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
|
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
|
||||||
@ -433,7 +433,7 @@ do_test fkey2-3.1.5 {
|
|||||||
do_test fkey2-3.2.1 {
|
do_test fkey2-3.2.1 {
|
||||||
execsql BEGIN;
|
execsql BEGIN;
|
||||||
catchsql { DELETE FROM ab }
|
catchsql { DELETE FROM ab }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-3.2.2 {
|
do_test fkey2-3.2.2 {
|
||||||
execsql COMMIT
|
execsql COMMIT
|
||||||
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
|
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
|
||||||
@ -555,7 +555,7 @@ do_test fkey2-7.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-7.2 {
|
do_test fkey2-7.2 {
|
||||||
catchsql { INSERT INTO t2 VALUES(1, 'A'); }
|
catchsql { INSERT INTO t2 VALUES(1, 'A'); }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-7.3 {
|
do_test fkey2-7.3 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO t1 VALUES(1, 2);
|
INSERT INTO t1 VALUES(1, 2);
|
||||||
@ -568,19 +568,19 @@ do_test fkey2-7.4 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-7.5 {
|
do_test fkey2-7.5 {
|
||||||
catchsql { UPDATE t2 SET c = 3 }
|
catchsql { UPDATE t2 SET c = 3 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-7.6 {
|
do_test fkey2-7.6 {
|
||||||
catchsql { DELETE FROM t1 WHERE a = 2 }
|
catchsql { DELETE FROM t1 WHERE a = 2 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-7.7 {
|
do_test fkey2-7.7 {
|
||||||
execsql { DELETE FROM t1 WHERE a = 1 }
|
execsql { DELETE FROM t1 WHERE a = 1 }
|
||||||
} {}
|
} {}
|
||||||
do_test fkey2-7.8 {
|
do_test fkey2-7.8 {
|
||||||
catchsql { UPDATE t1 SET a = 3 }
|
catchsql { UPDATE t1 SET a = 3 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-7.9 {
|
do_test fkey2-7.9 {
|
||||||
catchsql { UPDATE t2 SET rowid = 3 }
|
catchsql { UPDATE t2 SET rowid = 3 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# Test that it is not possible to enable/disable FK support while a
|
# Test that it is not possible to enable/disable FK support while a
|
||||||
@ -645,7 +645,7 @@ do_test fkey2-9.1.4 {
|
|||||||
} {2 two}
|
} {2 two}
|
||||||
do_test fkey2-9.1.5 {
|
do_test fkey2-9.1.5 {
|
||||||
catchsql { DELETE FROM t1 }
|
catchsql { DELETE FROM t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test fkey2-9.2.1 {
|
do_test fkey2-9.2.1 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -780,13 +780,13 @@ do_test fkey2-12.1.3 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-12.1.4 {
|
do_test fkey2-12.1.4 {
|
||||||
catchsql "UPDATE t1 SET b = 'five' WHERE b = 'two'"
|
catchsql "UPDATE t1 SET b = 'five' WHERE b = 'two'"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-12.1.5 {
|
do_test fkey2-12.1.5 {
|
||||||
execsql "DELETE FROM t1 WHERE b = 'two'"
|
execsql "DELETE FROM t1 WHERE b = 'two'"
|
||||||
} {}
|
} {}
|
||||||
do_test fkey2-12.1.6 {
|
do_test fkey2-12.1.6 {
|
||||||
catchsql "COMMIT"
|
catchsql "COMMIT"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-12.1.7 {
|
do_test fkey2-12.1.7 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO t1 VALUES(2, 'two');
|
INSERT INTO t1 VALUES(2, 'two');
|
||||||
@ -828,7 +828,7 @@ do_test fkey2-12.2.3 {
|
|||||||
INSERT INTO t2 VALUES('b');
|
INSERT INTO t2 VALUES('b');
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM t1 }
|
catchsql { DELETE FROM t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-12.2.4 {
|
do_test fkey2-12.2.4 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -866,14 +866,14 @@ do_test fkey2-12.3.2 {
|
|||||||
} {no possibly}
|
} {no possibly}
|
||||||
do_test fkey2-12.3.3 {
|
do_test fkey2-12.3.3 {
|
||||||
catchsql { INSERT INTO down(c39, c38) VALUES('yes', 'no') }
|
catchsql { INSERT INTO down(c39, c38) VALUES('yes', 'no') }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-12.3.4 {
|
do_test fkey2-12.3.4 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO up(c34, c35) VALUES('yes', 'no');
|
INSERT INTO up(c34, c35) VALUES('yes', 'no');
|
||||||
INSERT INTO down(c39, c38) VALUES('yes', 'no');
|
INSERT INTO down(c39, c38) VALUES('yes', 'no');
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM up WHERE c34 = 'yes' }
|
catchsql { DELETE FROM up WHERE c34 = 'yes' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-12.3.5 {
|
do_test fkey2-12.3.5 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM up WHERE c34 = 'possibly';
|
DELETE FROM up WHERE c34 = 'possibly';
|
||||||
@ -901,7 +901,7 @@ foreach {tn stmt} {
|
|||||||
} {
|
} {
|
||||||
do_test fkey2-13.1.$tn.1 {
|
do_test fkey2-13.1.$tn.1 {
|
||||||
catchsql $stmt
|
catchsql $stmt
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-13.1.$tn.2 {
|
do_test fkey2-13.1.$tn.2 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM pp;
|
SELECT * FROM pp;
|
||||||
@ -911,7 +911,7 @@ foreach {tn stmt} {
|
|||||||
do_test fkey2-13.1.$tn.3 {
|
do_test fkey2-13.1.$tn.3 {
|
||||||
execsql BEGIN;
|
execsql BEGIN;
|
||||||
catchsql $stmt
|
catchsql $stmt
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-13.1.$tn.4 {
|
do_test fkey2-13.1.$tn.4 {
|
||||||
execsql {
|
execsql {
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@ -1015,13 +1015,13 @@ ifcapable altertable {
|
|||||||
]
|
]
|
||||||
do_test fkey2-14.2.2.3 {
|
do_test fkey2-14.2.2.3 {
|
||||||
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-14.2.2.4 {
|
do_test fkey2-14.2.2.4 {
|
||||||
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
||||||
} {}
|
} {}
|
||||||
do_test fkey2-14.2.2.5 {
|
do_test fkey2-14.2.2.5 {
|
||||||
catchsql { UPDATE t4 SET b = 5 }
|
catchsql { UPDATE t4 SET b = 5 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-14.2.2.6 {
|
do_test fkey2-14.2.2.6 {
|
||||||
catchsql { UPDATE t4 SET b = 1 }
|
catchsql { UPDATE t4 SET b = 1 }
|
||||||
} {0 {}}
|
} {0 {}}
|
||||||
@ -1096,13 +1096,13 @@ ifcapable altertable {
|
|||||||
]
|
]
|
||||||
do_test fkey2-14.2tmp.2.3 {
|
do_test fkey2-14.2tmp.2.3 {
|
||||||
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-14.2tmp.2.4 {
|
do_test fkey2-14.2tmp.2.4 {
|
||||||
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
||||||
} {}
|
} {}
|
||||||
do_test fkey2-14.2tmp.2.5 {
|
do_test fkey2-14.2tmp.2.5 {
|
||||||
catchsql { UPDATE t4 SET b = 5 }
|
catchsql { UPDATE t4 SET b = 5 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-14.2tmp.2.6 {
|
do_test fkey2-14.2tmp.2.6 {
|
||||||
catchsql { UPDATE t4 SET b = 1 }
|
catchsql { UPDATE t4 SET b = 1 }
|
||||||
} {0 {}}
|
} {0 {}}
|
||||||
@ -1178,13 +1178,13 @@ ifcapable altertable {
|
|||||||
]
|
]
|
||||||
do_test fkey2-14.2aux.2.3 {
|
do_test fkey2-14.2aux.2.3 {
|
||||||
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-14.2aux.2.4 {
|
do_test fkey2-14.2aux.2.4 {
|
||||||
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
||||||
} {}
|
} {}
|
||||||
do_test fkey2-14.2aux.2.5 {
|
do_test fkey2-14.2aux.2.5 {
|
||||||
catchsql { UPDATE t4 SET b = 5 }
|
catchsql { UPDATE t4 SET b = 5 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-14.2aux.2.6 {
|
do_test fkey2-14.2aux.2.6 {
|
||||||
catchsql { UPDATE t4 SET b = 1 }
|
catchsql { UPDATE t4 SET b = 1 }
|
||||||
} {0 {}}
|
} {0 {}}
|
||||||
@ -1210,7 +1210,7 @@ do_test fkey-2.14.3.2 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey-2.14.3.3 {
|
do_test fkey-2.14.3.3 {
|
||||||
catchsql { DROP TABLE t1 }
|
catchsql { DROP TABLE t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey-2.14.3.4 {
|
do_test fkey-2.14.3.4 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM t2;
|
DELETE FROM t2;
|
||||||
@ -1229,7 +1229,7 @@ do_test fkey-2.14.3.5 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey-2.14.3.6 {
|
do_test fkey-2.14.3.6 {
|
||||||
catchsql { DROP TABLE t1 }
|
catchsql { DROP TABLE t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey-2.14.3.7 {
|
do_test fkey-2.14.3.7 {
|
||||||
execsql {
|
execsql {
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
@ -1387,15 +1387,15 @@ foreach {tn zSchema} {
|
|||||||
|
|
||||||
do_test fkey2-16.1.$tn.3 {
|
do_test fkey2-16.1.$tn.3 {
|
||||||
catchsql { UPDATE self SET b = 15 }
|
catchsql { UPDATE self SET b = 15 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test fkey2-16.1.$tn.4 {
|
do_test fkey2-16.1.$tn.4 {
|
||||||
catchsql { UPDATE self SET a = 15 }
|
catchsql { UPDATE self SET a = 15 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test fkey2-16.1.$tn.5 {
|
do_test fkey2-16.1.$tn.5 {
|
||||||
catchsql { UPDATE self SET a = 15, b = 16 }
|
catchsql { UPDATE self SET a = 15, b = 16 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test fkey2-16.1.$tn.6 {
|
do_test fkey2-16.1.$tn.6 {
|
||||||
catchsql { UPDATE self SET a = 17, b = 17 }
|
catchsql { UPDATE self SET a = 17, b = 17 }
|
||||||
@ -1406,7 +1406,7 @@ foreach {tn zSchema} {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-16.1.$tn.8 {
|
do_test fkey2-16.1.$tn.8 {
|
||||||
catchsql { INSERT INTO self VALUES(20, 21) }
|
catchsql { INSERT INTO self VALUES(20, 21) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -1463,7 +1463,7 @@ do_test fkey2-17.1.6 {
|
|||||||
INSERT INTO one VALUES(0, 0, 0);
|
INSERT INTO one VALUES(0, 0, 0);
|
||||||
UPDATE two SET e=e+1, f=f+1;
|
UPDATE two SET e=e+1, f=f+1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-17.1.7 {
|
do_test fkey2-17.1.7 {
|
||||||
execsql { SELECT * FROM one }
|
execsql { SELECT * FROM one }
|
||||||
} {1 2 3 2 3 4 3 4 5 0 0 0}
|
} {1 2 3 2 3 4 3 4 5 0 0 0}
|
||||||
@ -1619,7 +1619,7 @@ ifcapable auth {
|
|||||||
}
|
}
|
||||||
do_test fkey2-18.8 {
|
do_test fkey2-18.8 {
|
||||||
catchsql { INSERT INTO short VALUES(1, 3, 2) }
|
catchsql { INSERT INTO short VALUES(1, 3, 2) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-18.9 {
|
do_test fkey2-18.9 {
|
||||||
execsql { INSERT INTO short VALUES(1, 3, NULL) }
|
execsql { INSERT INTO short VALUES(1, 3, NULL) }
|
||||||
} {}
|
} {}
|
||||||
@ -1628,7 +1628,7 @@ ifcapable auth {
|
|||||||
} {1 3 2 1 3 {}}
|
} {1 3 2 1 3 {}}
|
||||||
do_test fkey2-18.11 {
|
do_test fkey2-18.11 {
|
||||||
catchsql { UPDATE short SET f = 2 WHERE f IS NULL }
|
catchsql { UPDATE short SET f = 2 WHERE f IS NULL }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
db auth {}
|
db auth {}
|
||||||
unset authargs
|
unset authargs
|
||||||
@ -1680,7 +1680,7 @@ foreach {tn insert} {
|
|||||||
} {
|
} {
|
||||||
do_test fkey2-20.2.$tn.1 {
|
do_test fkey2-20.2.$tn.1 {
|
||||||
catchsql "$insert INTO cc VALUES(1, 2)"
|
catchsql "$insert INTO cc VALUES(1, 2)"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-20.2.$tn.2 {
|
do_test fkey2-20.2.$tn.2 {
|
||||||
execsql { SELECT * FROM cc }
|
execsql { SELECT * FROM cc }
|
||||||
} {}
|
} {}
|
||||||
@ -1691,7 +1691,7 @@ foreach {tn insert} {
|
|||||||
INSERT INTO cc VALUES(1, 2);
|
INSERT INTO cc VALUES(1, 2);
|
||||||
}
|
}
|
||||||
catchsql "$insert INTO cc VALUES(3, 4)"
|
catchsql "$insert INTO cc VALUES(3, 4)"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-20.2.$tn.4 {
|
do_test fkey2-20.2.$tn.4 {
|
||||||
execsql { COMMIT ; SELECT * FROM cc }
|
execsql { COMMIT ; SELECT * FROM cc }
|
||||||
} {1 2}
|
} {1 2}
|
||||||
@ -1716,13 +1716,13 @@ foreach {tn update} {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-20.3.$tn.2 {
|
do_test fkey2-20.3.$tn.2 {
|
||||||
catchsql "$update pp SET a = 1"
|
catchsql "$update pp SET a = 1"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-20.3.$tn.3 {
|
do_test fkey2-20.3.$tn.3 {
|
||||||
execsql { SELECT * FROM pp }
|
execsql { SELECT * FROM pp }
|
||||||
} {2 two}
|
} {2 two}
|
||||||
do_test fkey2-20.3.$tn.4 {
|
do_test fkey2-20.3.$tn.4 {
|
||||||
catchsql "$update cc SET d = 1"
|
catchsql "$update cc SET d = 1"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-20.3.$tn.5 {
|
do_test fkey2-20.3.$tn.5 {
|
||||||
execsql { SELECT * FROM cc }
|
execsql { SELECT * FROM cc }
|
||||||
} {1 2}
|
} {1 2}
|
||||||
@ -1732,7 +1732,7 @@ foreach {tn update} {
|
|||||||
INSERT INTO pp VALUES(3, 'three');
|
INSERT INTO pp VALUES(3, 'three');
|
||||||
}
|
}
|
||||||
catchsql "$update pp SET a = 1 WHERE a = 2"
|
catchsql "$update pp SET a = 1 WHERE a = 2"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-20.3.$tn.7 {
|
do_test fkey2-20.3.$tn.7 {
|
||||||
execsql { COMMIT ; SELECT * FROM pp }
|
execsql { COMMIT ; SELECT * FROM pp }
|
||||||
} {2 two 3 three}
|
} {2 two 3 three}
|
||||||
@ -1742,7 +1742,7 @@ foreach {tn update} {
|
|||||||
INSERT INTO cc VALUES(2, 2);
|
INSERT INTO cc VALUES(2, 2);
|
||||||
}
|
}
|
||||||
catchsql "$update cc SET d = 1 WHERE c = 1"
|
catchsql "$update cc SET d = 1 WHERE c = 1"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-20.3.$tn.9 {
|
do_test fkey2-20.3.$tn.9 {
|
||||||
execsql { COMMIT ; SELECT * FROM cc }
|
execsql { COMMIT ; SELECT * FROM cc }
|
||||||
} {1 2 2 2}
|
} {1 2 2 2}
|
||||||
@ -1768,7 +1768,7 @@ do_test fkey2-genfkey.1.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-genfkey.1.2 {
|
do_test fkey2-genfkey.1.2 {
|
||||||
catchsql { INSERT INTO t2 VALUES(1, 2) }
|
catchsql { INSERT INTO t2 VALUES(1, 2) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-genfkey.1.3 {
|
do_test fkey2-genfkey.1.3 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO t1 VALUES(1, 2, 3);
|
INSERT INTO t1 VALUES(1, 2, 3);
|
||||||
@ -1780,7 +1780,7 @@ do_test fkey2-genfkey.1.4 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-genfkey.1.5 {
|
do_test fkey2-genfkey.1.5 {
|
||||||
catchsql { UPDATE t2 SET e = 5 WHERE e IS NULL }
|
catchsql { UPDATE t2 SET e = 5 WHERE e IS NULL }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-genfkey.1.6 {
|
do_test fkey2-genfkey.1.6 {
|
||||||
execsql { UPDATE t2 SET e = 1 WHERE e IS NULL }
|
execsql { UPDATE t2 SET e = 1 WHERE e IS NULL }
|
||||||
} {}
|
} {}
|
||||||
@ -1789,13 +1789,13 @@ do_test fkey2-genfkey.1.7 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-genfkey.1.8 {
|
do_test fkey2-genfkey.1.8 {
|
||||||
catchsql { UPDATE t1 SET a = 10 }
|
catchsql { UPDATE t1 SET a = 10 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-genfkey.1.9 {
|
do_test fkey2-genfkey.1.9 {
|
||||||
catchsql { UPDATE t1 SET a = NULL }
|
catchsql { UPDATE t1 SET a = NULL }
|
||||||
} {1 {datatype mismatch}}
|
} {1 {datatype mismatch}}
|
||||||
do_test fkey2-genfkey.1.10 {
|
do_test fkey2-genfkey.1.10 {
|
||||||
catchsql { DELETE FROM t1 }
|
catchsql { DELETE FROM t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-genfkey.1.11 {
|
do_test fkey2-genfkey.1.11 {
|
||||||
execsql { UPDATE t2 SET e = NULL }
|
execsql { UPDATE t2 SET e = NULL }
|
||||||
} {}
|
} {}
|
||||||
@ -1815,7 +1815,7 @@ do_test fkey2-genfkey.1.13 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-genfkey.1.14 {
|
do_test fkey2-genfkey.1.14 {
|
||||||
catchsql { INSERT INTO t3 VALUES(3, 1, 4) }
|
catchsql { INSERT INTO t3 VALUES(3, 1, 4) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-genfkey.1.15 {
|
do_test fkey2-genfkey.1.15 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO t1 VALUES(1, 1, 4);
|
INSERT INTO t1 VALUES(1, 1, 4);
|
||||||
@ -1824,16 +1824,16 @@ do_test fkey2-genfkey.1.15 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey2-genfkey.1.16 {
|
do_test fkey2-genfkey.1.16 {
|
||||||
catchsql { DELETE FROM t1 }
|
catchsql { DELETE FROM t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-genfkey.1.17 {
|
do_test fkey2-genfkey.1.17 {
|
||||||
catchsql { UPDATE t1 SET b = 10}
|
catchsql { UPDATE t1 SET b = 10}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-genfkey.1.18 {
|
do_test fkey2-genfkey.1.18 {
|
||||||
execsql { UPDATE t1 SET a = 10}
|
execsql { UPDATE t1 SET a = 10}
|
||||||
} {}
|
} {}
|
||||||
do_test fkey2-genfkey.1.19 {
|
do_test fkey2-genfkey.1.19 {
|
||||||
catchsql { UPDATE t3 SET h = 'hello' WHERE i = 3}
|
catchsql { UPDATE t3 SET h = 'hello' WHERE i = 3}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
drop_all_tables
|
drop_all_tables
|
||||||
do_test fkey2-genfkey.2.1 {
|
do_test fkey2-genfkey.2.1 {
|
||||||
@ -1946,7 +1946,7 @@ do_test fkey2-dd08e5.1.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
DELETE FROM tdd08;
|
DELETE FROM tdd08;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-dd08e5.1.3 {
|
do_test fkey2-dd08e5.1.3 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM tdd08;
|
SELECT * FROM tdd08;
|
||||||
@ -1956,17 +1956,17 @@ do_test fkey2-dd08e5.1.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO tdd08_b VALUES(400,500,300);
|
INSERT INTO tdd08_b VALUES(400,500,300);
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-dd08e5.1.5 {
|
do_test fkey2-dd08e5.1.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tdd08_b SET x=x+1;
|
UPDATE tdd08_b SET x=x+1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-dd08e5.1.6 {
|
do_test fkey2-dd08e5.1.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tdd08 SET a=a+1;
|
UPDATE tdd08 SET a=a+1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# Verify that ticket ce7c133ea6cc9ccdc1a60d80441f80b6180f5eba
|
# Verify that ticket ce7c133ea6cc9ccdc1a60d80441f80b6180f5eba
|
||||||
@ -1987,12 +1987,12 @@ do_test fkey2-ce7c13.1.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tce71 set b = 201 where a = 100;
|
UPDATE tce71 set b = 201 where a = 100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-ce7c13.1.3 {
|
do_test fkey2-ce7c13.1.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tce71 set a = 101 where a = 100;
|
UPDATE tce71 set a = 101 where a = 100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-ce7c13.1.4 {
|
do_test fkey2-ce7c13.1.4 {
|
||||||
execsql {
|
execsql {
|
||||||
CREATE TABLE tce73(a INTEGER PRIMARY KEY, b, UNIQUE(a,b));
|
CREATE TABLE tce73(a INTEGER PRIMARY KEY, b, UNIQUE(a,b));
|
||||||
@ -2007,11 +2007,11 @@ do_test fkey2-ce7c13.1.5 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tce73 set b = 201 where a = 100;
|
UPDATE tce73 set b = 201 where a = 100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey2-ce7c13.1.6 {
|
do_test fkey2-ce7c13.1.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tce73 set a = 101 where a = 100;
|
UPDATE tce73 set a = 101 where a = 100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
@ -43,13 +43,13 @@ do_test fkey3-1.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
DELETE FROM t1 WHERE x=100;
|
DELETE FROM t1 WHERE x=100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test fkey3-1.3 {
|
do_test fkey3-1.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test fkey3-1.4 {
|
do_test fkey3-1.4 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -95,17 +95,17 @@ do_execsql_test 3.1.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_catchsql_test 3.1.2 {
|
do_catchsql_test 3.1.2 {
|
||||||
INSERT INTO t3 VALUES(NULL, 2, 5, 2);
|
INSERT INTO t3 VALUES(NULL, 2, 5, 2);
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_catchsql_test 3.1.3 {
|
do_catchsql_test 3.1.3 {
|
||||||
INSERT INTO t3 VALUES(NULL, 3, 5, 2);
|
INSERT INTO t3 VALUES(NULL, 3, 5, 2);
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_execsql_test 3.2.1 {
|
do_execsql_test 3.2.1 {
|
||||||
CREATE TABLE t4(a UNIQUE, b REFERENCES t4(a));
|
CREATE TABLE t4(a UNIQUE, b REFERENCES t4(a));
|
||||||
}
|
}
|
||||||
do_catchsql_test 3.2.2 {
|
do_catchsql_test 3.2.2 {
|
||||||
INSERT INTO t4 VALUES(NULL, 1);
|
INSERT INTO t4 VALUES(NULL, 1);
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_execsql_test 3.3.1 {
|
do_execsql_test 3.3.1 {
|
||||||
CREATE TABLE t5(a INTEGER PRIMARY KEY, b REFERENCES t5(a));
|
CREATE TABLE t5(a INTEGER PRIMARY KEY, b REFERENCES t5(a));
|
||||||
@ -113,7 +113,7 @@ do_execsql_test 3.3.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_catchsql_test 3.3.2 {
|
do_catchsql_test 3.3.2 {
|
||||||
INSERT INTO t5 VALUES(NULL, 3);
|
INSERT INTO t5 VALUES(NULL, 3);
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_execsql_test 3.4.1 {
|
do_execsql_test 3.4.1 {
|
||||||
CREATE TABLE t6(a INTEGER PRIMARY KEY, b, c, d,
|
CREATE TABLE t6(a INTEGER PRIMARY KEY, b, c, d,
|
||||||
@ -127,7 +127,7 @@ do_execsql_test 3.4.4 { INSERT INTO t6 VALUES(NULL, 'a', 1, 'a'); } {}
|
|||||||
do_execsql_test 3.4.5 { INSERT INTO t6 VALUES(5, 'a', 2, 'a'); } {}
|
do_execsql_test 3.4.5 { INSERT INTO t6 VALUES(5, 'a', 2, 'a'); } {}
|
||||||
do_catchsql_test 3.4.6 {
|
do_catchsql_test 3.4.6 {
|
||||||
INSERT INTO t6 VALUES(NULL, 'a', 65, 'a');
|
INSERT INTO t6 VALUES(NULL, 'a', 65, 'a');
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_execsql_test 3.4.7 {
|
do_execsql_test 3.4.7 {
|
||||||
INSERT INTO t6 VALUES(100, 'one', 100, 'one');
|
INSERT INTO t6 VALUES(100, 'one', 100, 'one');
|
||||||
@ -149,10 +149,10 @@ do_execsql_test 3.5.2 { INSERT INTO t7 VALUES('x', 1, 'x', NULL) } {}
|
|||||||
do_execsql_test 3.5.3 { INSERT INTO t7 VALUES('x', 2, 'x', 2) } {}
|
do_execsql_test 3.5.3 { INSERT INTO t7 VALUES('x', 2, 'x', 2) } {}
|
||||||
do_catchsql_test 3.5.4 {
|
do_catchsql_test 3.5.4 {
|
||||||
INSERT INTO t7 VALUES('x', 450, 'x', NULL);
|
INSERT INTO t7 VALUES('x', 450, 'x', NULL);
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_catchsql_test 3.5.5 {
|
do_catchsql_test 3.5.5 {
|
||||||
INSERT INTO t7 VALUES('x', 450, 'x', 451);
|
INSERT INTO t7 VALUES('x', 450, 'x', 451);
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
|
|
||||||
do_execsql_test 3.6.1 {
|
do_execsql_test 3.6.1 {
|
||||||
@ -163,7 +163,7 @@ do_execsql_test 3.6.1 {
|
|||||||
}
|
}
|
||||||
do_catchsql_test 3.6.2 {
|
do_catchsql_test 3.6.2 {
|
||||||
UPDATE t8 SET d = 2;
|
UPDATE t8 SET d = 2;
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_execsql_test 3.6.3 { UPDATE t8 SET d = 1; }
|
do_execsql_test 3.6.3 { UPDATE t8 SET d = 1; }
|
||||||
do_execsql_test 3.6.4 { UPDATE t8 SET e = 2; }
|
do_execsql_test 3.6.4 { UPDATE t8 SET e = 2; }
|
||||||
|
|
||||||
@ -181,6 +181,6 @@ do_catchsql_test 3.6.5 {
|
|||||||
INSERT INTO TestTable VALUES (1, 'parent', 1, null);
|
INSERT INTO TestTable VALUES (1, 'parent', 1, null);
|
||||||
INSERT INTO TestTable VALUES (2, 'child', 1, 1);
|
INSERT INTO TestTable VALUES (2, 'child', 1, 1);
|
||||||
UPDATE TestTable SET parent_id=1000 where id=2;
|
UPDATE TestTable SET parent_id=1000 where id=2;
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
@ -47,7 +47,7 @@ do_execsql_test fkey6-1.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test fkey6-1.2 {
|
do_test fkey6-1.2 {
|
||||||
catchsql {DELETE FROM t1 WHERE x=2;}
|
catchsql {DELETE FROM t1 WHERE x=2;}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test fkey6-1.3 {
|
do_test fkey6-1.3 {
|
||||||
sqlite3_db_status db DBSTATUS_DEFERRED_FKS 0
|
sqlite3_db_status db DBSTATUS_DEFERRED_FKS 0
|
||||||
} {0 0 0}
|
} {0 0 0}
|
||||||
@ -99,7 +99,7 @@ do_execsql_test fkey6-1.10.1 {
|
|||||||
} {1 0 1 0}
|
} {1 0 1 0}
|
||||||
do_test fkey6-1.10.2 {
|
do_test fkey6-1.10.2 {
|
||||||
catchsql {DELETE FROM t1 WHERE x=3}
|
catchsql {DELETE FROM t1 WHERE x=3}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
db eval {ROLLBACK}
|
db eval {ROLLBACK}
|
||||||
|
|
||||||
do_test fkey6-1.20 {
|
do_test fkey6-1.20 {
|
||||||
@ -173,4 +173,3 @@ do_execsql_test fkey6-2.6 {
|
|||||||
|
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|
||||||
|
@ -381,32 +381,32 @@ ifcapable check {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (NULL);
|
INSERT INTO t1 (x) VALUES (NULL);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.3 {
|
do_test func4-3.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (NULL);
|
INSERT INTO t1 (x) VALUES (NULL);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.4 {
|
do_test func4-3.4 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES ('');
|
INSERT INTO t1 (x) VALUES ('');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.5 {
|
do_test func4-3.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES ('bad');
|
INSERT INTO t1 (x) VALUES ('bad');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.6 {
|
do_test func4-3.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES ('1234bad');
|
INSERT INTO t1 (x) VALUES ('1234bad');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.7 {
|
do_test func4-3.7 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES ('1234.56bad');
|
INSERT INTO t1 (x) VALUES ('1234.56bad');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.8 {
|
do_test func4-3.8 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (1234);
|
INSERT INTO t1 (x) VALUES (1234);
|
||||||
@ -416,7 +416,7 @@ ifcapable check {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (1234.56);
|
INSERT INTO t1 (x) VALUES (1234.56);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.10 {
|
do_test func4-3.10 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES ('1234');
|
INSERT INTO t1 (x) VALUES ('1234');
|
||||||
@ -426,32 +426,32 @@ ifcapable check {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES ('1234.56');
|
INSERT INTO t1 (x) VALUES ('1234.56');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.12 {
|
do_test func4-3.12 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (ZEROBLOB(4));
|
INSERT INTO t1 (x) VALUES (ZEROBLOB(4));
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.13 {
|
do_test func4-3.13 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (X'');
|
INSERT INTO t1 (x) VALUES (X'');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.14 {
|
do_test func4-3.14 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (X'1234');
|
INSERT INTO t1 (x) VALUES (X'1234');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.15 {
|
do_test func4-3.15 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (X'12345678');
|
INSERT INTO t1 (x) VALUES (X'12345678');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.16 {
|
do_test func4-3.16 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES ('1234.00');
|
INSERT INTO t1 (x) VALUES ('1234.00');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
do_test func4-3.17 {
|
do_test func4-3.17 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (1234.00);
|
INSERT INTO t1 (x) VALUES (1234.00);
|
||||||
@ -461,13 +461,13 @@ ifcapable check {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES ('-9223372036854775809');
|
INSERT INTO t1 (x) VALUES ('-9223372036854775809');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
if {$highPrecision(1)} {
|
if {$highPrecision(1)} {
|
||||||
do_test func4-3.19 {
|
do_test func4-3.19 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 (x) VALUES (9223372036854775808);
|
INSERT INTO t1 (x) VALUES (9223372036854775808);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
}
|
}
|
||||||
do_execsql_test func4-3.20 {
|
do_execsql_test func4-3.20 {
|
||||||
SELECT x FROM t1 ORDER BY x;
|
SELECT x FROM t1 ORDER BY x;
|
||||||
@ -483,32 +483,32 @@ ifcapable check {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES (NULL);
|
INSERT INTO t2 (x) VALUES (NULL);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.3 {
|
do_test func4-4.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES (NULL);
|
INSERT INTO t2 (x) VALUES (NULL);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.4 {
|
do_test func4-4.4 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES ('');
|
INSERT INTO t2 (x) VALUES ('');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.5 {
|
do_test func4-4.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES ('bad');
|
INSERT INTO t2 (x) VALUES ('bad');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.6 {
|
do_test func4-4.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES ('1234bad');
|
INSERT INTO t2 (x) VALUES ('1234bad');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.7 {
|
do_test func4-4.7 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES ('1234.56bad');
|
INSERT INTO t2 (x) VALUES ('1234.56bad');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.8 {
|
do_test func4-4.8 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES (1234);
|
INSERT INTO t2 (x) VALUES (1234);
|
||||||
@ -533,22 +533,22 @@ ifcapable check {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES (ZEROBLOB(4));
|
INSERT INTO t2 (x) VALUES (ZEROBLOB(4));
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.13 {
|
do_test func4-4.13 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES (X'');
|
INSERT INTO t2 (x) VALUES (X'');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.14 {
|
do_test func4-4.14 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES (X'1234');
|
INSERT INTO t2 (x) VALUES (X'1234');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_test func4-4.15 {
|
do_test func4-4.15 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 (x) VALUES (X'12345678');
|
INSERT INTO t2 (x) VALUES (X'12345678');
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t2}}
|
||||||
do_execsql_test func4-4.16 {
|
do_execsql_test func4-4.16 {
|
||||||
SELECT x FROM t2 ORDER BY x;
|
SELECT x FROM t2 ORDER BY x;
|
||||||
} {1234.0 1234.0 1234.56 1234.56}
|
} {1234.0 1234.0 1234.56 1234.56}
|
||||||
|
@ -332,7 +332,7 @@ do_test in-10.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t5 VALUES(4);
|
INSERT INTO t5 VALUES(4);
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t5}}
|
||||||
|
|
||||||
# Ticket #1821
|
# Ticket #1821
|
||||||
#
|
#
|
||||||
|
@ -397,16 +397,16 @@ do_test incrblob2-8.4 {
|
|||||||
} {cccccccccccccccccccc}
|
} {cccccccccccccccccccc}
|
||||||
do_test incrblob2-8.5 {
|
do_test incrblob2-8.5 {
|
||||||
catchsql {UPDATE t3 SET a = 6 WHERE a > 3}
|
catchsql {UPDATE t3 SET a = 6 WHERE a > 3}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t3.a}}
|
||||||
do_test incrblob2-8.6 {
|
do_test incrblob2-8.6 {
|
||||||
catchsql {UPDATE t3 SET a = 6 WHERE a > 3}
|
catchsql {UPDATE t3 SET a = 6 WHERE a > 3}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t3.a}}
|
||||||
do_test incrblob2-8.7 {
|
do_test incrblob2-8.7 {
|
||||||
sqlite3_blob_read $h 0 20
|
sqlite3_blob_read $h 0 20
|
||||||
} {cccccccccccccccccccc}
|
} {cccccccccccccccccccc}
|
||||||
do_test incrblob2-8.8 {
|
do_test incrblob2-8.8 {
|
||||||
catchsql {UPDATE t3 SET a = 6 WHERE a = 3 OR a = 5}
|
catchsql {UPDATE t3 SET a = 6 WHERE a = 3 OR a = 5}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t3.a}}
|
||||||
do_test incrblob2-8.9 {
|
do_test incrblob2-8.9 {
|
||||||
set rc [catch {sqlite3_blob_read $h 0 20} msg]
|
set rc [catch {sqlite3_blob_read $h 0 20} msg]
|
||||||
list $rc $msg
|
list $rc $msg
|
||||||
|
@ -666,7 +666,7 @@ ifcapable conflict {
|
|||||||
BEGIN;
|
BEGIN;
|
||||||
INSERT INTO t7 VALUES(1);
|
INSERT INTO t7 VALUES(1);
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t7.a}}
|
||||||
do_test index-19.3 {
|
do_test index-19.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
BEGIN;
|
BEGIN;
|
||||||
@ -676,7 +676,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t8 VALUES(1);
|
INSERT INTO t8 VALUES(1);
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t8.a}}
|
||||||
do_test index-19.5 {
|
do_test index-19.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
@ -34,7 +34,7 @@ do_test index3-1.2 {
|
|||||||
BEGIN;
|
BEGIN;
|
||||||
CREATE UNIQUE INDEX i1 ON t1(a);
|
CREATE UNIQUE INDEX i1 ON t1(a);
|
||||||
}
|
}
|
||||||
} {1 {indexed columns are not unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test index3-1.3 {
|
do_test index3-1.3 {
|
||||||
catchsql COMMIT;
|
catchsql COMMIT;
|
||||||
} {0 {}}
|
} {0 {}}
|
||||||
|
@ -120,7 +120,7 @@ do_execsql_test 2.1 {
|
|||||||
}
|
}
|
||||||
do_catchsql_test 2.2 {
|
do_catchsql_test 2.2 {
|
||||||
CREATE UNIQUE INDEX i3 ON t2(x);
|
CREATE UNIQUE INDEX i3 ON t2(x);
|
||||||
} {1 {indexed columns are not unique}}
|
} {1 {UNIQUE constraint failed: t2.x}}
|
||||||
|
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
@ -220,7 +220,7 @@ do_test index6-3.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t3(a,b) VALUES(150, 'test1');
|
INSERT INTO t3(a,b) VALUES(150, 'test1');
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t3.a}}
|
||||||
do_test index6-3.3 {
|
do_test index6-3.3 {
|
||||||
# can insert multiple rows with a==999 because such rows are not
|
# can insert multiple rows with a==999 because such rows are not
|
||||||
# part of the unique index.
|
# part of the unique index.
|
||||||
|
@ -220,7 +220,7 @@ do_test index7-3.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t3(a,b) VALUES(150, 'test1');
|
INSERT INTO t3(a,b) VALUES(150, 'test1');
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t3.a}}
|
||||||
do_test index7-3.3 {
|
do_test index7-3.3 {
|
||||||
# can insert multiple rows with a==999 because such rows are not
|
# can insert multiple rows with a==999 because such rows are not
|
||||||
# part of the unique index.
|
# part of the unique index.
|
||||||
|
@ -54,7 +54,7 @@ do_test insert4-1.1 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 SELECT * FROM t2;
|
INSERT INTO t1 SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
xferopt_test insert4-1.2 0
|
xferopt_test insert4-1.2 0
|
||||||
do_test insert4-1.3 {
|
do_test insert4-1.3 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -101,7 +101,7 @@ do_test insert4-2.3.3 {
|
|||||||
INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
|
INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
xferopt_test insert4-2.3.4 0
|
xferopt_test insert4-2.3.4 0
|
||||||
|
|
||||||
# Do not run the transfer optimization if there is a DISTINCT
|
# Do not run the transfer optimization if there is a DISTINCT
|
||||||
@ -119,7 +119,7 @@ do_test insert4-2.4.3 {
|
|||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
INSERT INTO t1 SELECT DISTINCT * FROM t2;
|
INSERT INTO t1 SELECT DISTINCT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t1}}
|
||||||
xferopt_test insert4-2.4.4 0
|
xferopt_test insert4-2.4.4 0
|
||||||
|
|
||||||
# The following procedure constructs two tables then tries to transfer
|
# The following procedure constructs two tables then tries to transfer
|
||||||
@ -315,7 +315,7 @@ do_test insert4-6.6 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t6b SELECT * FROM t6a;
|
INSERT INTO t6b SELECT * FROM t6a;
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t6b}}
|
||||||
do_test insert4-6.7 {
|
do_test insert4-6.7 {
|
||||||
execsql {
|
execsql {
|
||||||
DROP TABLE t6b;
|
DROP TABLE t6b;
|
||||||
@ -324,7 +324,7 @@ do_test insert4-6.7 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t6b SELECT * FROM t6a;
|
INSERT INTO t6b SELECT * FROM t6a;
|
||||||
}
|
}
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: t6b}}
|
||||||
|
|
||||||
# Ticket [6284df89debdfa61db8073e062908af0c9b6118e]
|
# Ticket [6284df89debdfa61db8073e062908af0c9b6118e]
|
||||||
# Disable the xfer optimization if the destination table contains
|
# Disable the xfer optimization if the destination table contains
|
||||||
@ -353,7 +353,7 @@ ifcapable foreignkey {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t7b SELECT * FROM t7c;
|
INSERT INTO t7b SELECT * FROM t7c;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test insert4-7.4 {
|
do_test insert4-7.4 {
|
||||||
execsql {SELECT * FROM t7b}
|
execsql {SELECT * FROM t7b}
|
||||||
} {}
|
} {}
|
||||||
@ -452,7 +452,7 @@ do_test insert4-8.5 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 SELECT * FROM t2;
|
INSERT INTO t1 SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test insert4-8.6 {
|
do_test insert4-8.6 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -472,7 +472,7 @@ do_test insert4-8.7 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 SELECT * FROM t2;
|
INSERT INTO t1 SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test insert4-8.8 {
|
do_test insert4-8.8 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -494,7 +494,7 @@ do_test insert4-8.9 {
|
|||||||
INSERT INTO t1 VALUES(2,3);
|
INSERT INTO t1 VALUES(2,3);
|
||||||
INSERT INTO t1 SELECT * FROM t2;
|
INSERT INTO t1 SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test insert4-8.10 {
|
do_test insert4-8.10 {
|
||||||
catchsql {COMMIT}
|
catchsql {COMMIT}
|
||||||
} {1 {cannot commit - no transaction is active}}
|
} {1 {cannot commit - no transaction is active}}
|
||||||
|
@ -76,7 +76,7 @@ do_test intpkey-1.6 {
|
|||||||
INSERT INTO t1 VALUES(5,'second','entry');
|
INSERT INTO t1 VALUES(5,'second','entry');
|
||||||
}} msg]
|
}} msg]
|
||||||
lappend r $msg
|
lappend r $msg
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test intpkey-1.7 {
|
do_test intpkey-1.7 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT rowid, * FROM t1;
|
SELECT rowid, * FROM t1;
|
||||||
|
@ -240,7 +240,7 @@ foreach {i conf1 conf2 cmd t0 t1 t2} {
|
|||||||
if {$i>1} break
|
if {$i>1} break
|
||||||
}
|
}
|
||||||
|
|
||||||
if {$t0} {set t1 {column a is not unique}}
|
if {$t0} {set t1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test memdb-5.$i {
|
do_test memdb-5.$i {
|
||||||
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
|
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
|
||||||
if {$conf2!=""} {set conf2 "ON CONFLICT $conf2"}
|
if {$conf2!=""} {set conf2 "ON CONFLICT $conf2"}
|
||||||
|
@ -235,7 +235,7 @@ do_test misc1-7.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t5 VALUES(1,2,4);
|
INSERT INTO t5 VALUES(1,2,4);
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t5.a, t5.b}}
|
||||||
do_test misc1-7.5 {
|
do_test misc1-7.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t5 VALUES(0,2,4);
|
INSERT INTO t5 VALUES(0,2,4);
|
||||||
|
@ -47,7 +47,7 @@ do_test notnull-1.2 {
|
|||||||
INSERT INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
INSERT INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-1.2b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-1.2b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-1.3 {
|
do_test notnull-1.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -62,7 +62,7 @@ do_test notnull-1.4 {
|
|||||||
INSERT OR REPLACE INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
INSERT OR REPLACE INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-1.4b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-1.4b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-1.5 {
|
do_test notnull-1.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -70,7 +70,7 @@ do_test notnull-1.5 {
|
|||||||
INSERT OR ABORT INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
INSERT OR ABORT INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-1.5b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-1.5b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-1.6 {
|
do_test notnull-1.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -106,7 +106,7 @@ do_test notnull-1.10 {
|
|||||||
INSERT INTO t1(a,b,c,d,e) VALUES(1,null,3,4,5);
|
INSERT INTO t1(a,b,c,d,e) VALUES(1,null,3,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.b may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.b}}
|
||||||
verify_ex_errcode notnull-1.10b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-1.10b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-1.11 {
|
do_test notnull-1.11 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -149,7 +149,7 @@ do_test notnull-1.16 {
|
|||||||
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,null,4,5);
|
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,null,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.c may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.c}}
|
||||||
verify_ex_errcode notnull-1.16b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-1.16b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-1.17 {
|
do_test notnull-1.17 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -157,7 +157,7 @@ do_test notnull-1.17 {
|
|||||||
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,3,null,5);
|
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,3,null,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.d may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.d}}
|
||||||
verify_ex_errcode notnull-1.17b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-1.17b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-1.18 {
|
do_test notnull-1.18 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -179,7 +179,7 @@ do_test notnull-1.20 {
|
|||||||
INSERT INTO t1(a,b,c,d,e) VALUES(1,2,3,4,null);
|
INSERT INTO t1(a,b,c,d,e) VALUES(1,2,3,4,null);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.e may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.e}}
|
||||||
verify_ex_errcode notnull-1.20b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-1.20b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-1.21 {
|
do_test notnull-1.21 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -196,7 +196,7 @@ do_test notnull-2.1 {
|
|||||||
UPDATE t1 SET a=null;
|
UPDATE t1 SET a=null;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-2.1b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-2.1b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-2.2 {
|
do_test notnull-2.2 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -205,7 +205,7 @@ do_test notnull-2.2 {
|
|||||||
UPDATE OR REPLACE t1 SET a=null;
|
UPDATE OR REPLACE t1 SET a=null;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-2.2b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-2.2b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-2.3 {
|
do_test notnull-2.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -222,7 +222,7 @@ do_test notnull-2.4 {
|
|||||||
UPDATE OR ABORT t1 SET a=null;
|
UPDATE OR ABORT t1 SET a=null;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-2.4b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-2.4b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-2.5 {
|
do_test notnull-2.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -231,7 +231,7 @@ do_test notnull-2.5 {
|
|||||||
UPDATE t1 SET b=null;
|
UPDATE t1 SET b=null;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.b may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.b}}
|
||||||
verify_ex_errcode notnull-2.6b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-2.6b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-2.6 {
|
do_test notnull-2.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -272,7 +272,7 @@ do_test notnull-2.10 {
|
|||||||
UPDATE t1 SET e=null, a=b, b=a;
|
UPDATE t1 SET e=null, a=b, b=a;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.e may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.e}}
|
||||||
verify_ex_errcode notnull-2.10b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-2.10b SQLITE_CONSTRAINT_NOTNULL
|
||||||
|
|
||||||
do_test notnull-3.0 {
|
do_test notnull-3.0 {
|
||||||
@ -298,7 +298,7 @@ do_test notnull-3.2 {
|
|||||||
INSERT INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
INSERT INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-3.2b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-3.2b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-3.3 {
|
do_test notnull-3.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -313,7 +313,7 @@ do_test notnull-3.4 {
|
|||||||
INSERT OR REPLACE INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
INSERT OR REPLACE INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-3.4b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-3.4b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-3.5 {
|
do_test notnull-3.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -321,7 +321,7 @@ do_test notnull-3.5 {
|
|||||||
INSERT OR ABORT INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
INSERT OR ABORT INTO t1(b,c,d,e) VALUES(2,3,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-3.5b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-3.5b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-3.6 {
|
do_test notnull-3.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -357,7 +357,7 @@ do_test notnull-3.10 {
|
|||||||
INSERT INTO t1(a,b,c,d,e) VALUES(1,null,3,4,5);
|
INSERT INTO t1(a,b,c,d,e) VALUES(1,null,3,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.b may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.b}}
|
||||||
verify_ex_errcode notnull-3.10b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-3.10b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-3.11 {
|
do_test notnull-3.11 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -400,7 +400,7 @@ do_test notnull-3.16 {
|
|||||||
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,null,4,5);
|
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,null,4,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.c may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.c}}
|
||||||
verify_ex_errcode notnull-3.16b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-3.16b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-3.17 {
|
do_test notnull-3.17 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -408,7 +408,7 @@ do_test notnull-3.17 {
|
|||||||
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,3,null,5);
|
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,3,null,5);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.d may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.d}}
|
||||||
verify_ex_errcode notnull-3.17b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-3.17b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-3.18 {
|
do_test notnull-3.18 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -430,7 +430,7 @@ do_test notnull-3.20 {
|
|||||||
INSERT INTO t1(a,b,c,d,e) VALUES(1,2,3,4,null);
|
INSERT INTO t1(a,b,c,d,e) VALUES(1,2,3,4,null);
|
||||||
SELECT * FROM t1 order by a;
|
SELECT * FROM t1 order by a;
|
||||||
}
|
}
|
||||||
} {1 {t1.e may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.e}}
|
||||||
verify_ex_errcode notnull-3.20b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-3.20b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-3.21 {
|
do_test notnull-3.21 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -447,7 +447,7 @@ do_test notnull-4.1 {
|
|||||||
UPDATE t1 SET a=null;
|
UPDATE t1 SET a=null;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-4.1b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-4.1b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-4.2 {
|
do_test notnull-4.2 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -456,7 +456,7 @@ do_test notnull-4.2 {
|
|||||||
UPDATE OR REPLACE t1 SET a=null;
|
UPDATE OR REPLACE t1 SET a=null;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-4.2b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-4.2b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-4.3 {
|
do_test notnull-4.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -473,7 +473,7 @@ do_test notnull-4.4 {
|
|||||||
UPDATE OR ABORT t1 SET a=null;
|
UPDATE OR ABORT t1 SET a=null;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
verify_ex_errcode notnull-4.4b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-4.4b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-4.5 {
|
do_test notnull-4.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -482,7 +482,7 @@ do_test notnull-4.5 {
|
|||||||
UPDATE t1 SET b=null;
|
UPDATE t1 SET b=null;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.b may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.b}}
|
||||||
verify_ex_errcode notnull-4.5b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-4.5b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-4.6 {
|
do_test notnull-4.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -523,7 +523,7 @@ do_test notnull-4.10 {
|
|||||||
UPDATE t1 SET e=null, a=b, b=a;
|
UPDATE t1 SET e=null, a=b, b=a;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
}
|
}
|
||||||
} {1 {t1.e may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.e}}
|
||||||
verify_ex_errcode notnull-4.10b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-4.10b SQLITE_CONSTRAINT_NOTNULL
|
||||||
|
|
||||||
# Test that bug 29ab7be99f is fixed.
|
# Test that bug 29ab7be99f is fixed.
|
||||||
@ -542,7 +542,7 @@ do_test notnull-5.2 {
|
|||||||
INSERT INTO t1 VALUES(1, 2);
|
INSERT INTO t1 VALUES(1, 2);
|
||||||
INSERT INTO t1 SELECT * FROM t2;
|
INSERT INTO t1 SELECT * FROM t2;
|
||||||
}
|
}
|
||||||
} {1 {t1.b may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.b}}
|
||||||
verify_ex_errcode notnull-5.2b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-5.2b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-5.3 {
|
do_test notnull-5.3 {
|
||||||
execsql { SELECT * FROM t1 }
|
execsql { SELECT * FROM t1 }
|
||||||
@ -555,7 +555,7 @@ do_test notnull-5.4 {
|
|||||||
INSERT INTO t1 SELECT * FROM t2;
|
INSERT INTO t1 SELECT * FROM t2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
}
|
}
|
||||||
} {1 {t1.b may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.b}}
|
||||||
verify_ex_errcode notnull-5.4b SQLITE_CONSTRAINT_NOTNULL
|
verify_ex_errcode notnull-5.4b SQLITE_CONSTRAINT_NOTNULL
|
||||||
do_test notnull-5.5 {
|
do_test notnull-5.5 {
|
||||||
execsql { SELECT * FROM t1 }
|
execsql { SELECT * FROM t1 }
|
||||||
|
@ -271,7 +271,7 @@ do_execsql_test pager1-3.1.2 {
|
|||||||
} {3 0}
|
} {3 0}
|
||||||
do_catchsql_test pager1-3.1.3 {
|
do_catchsql_test pager1-3.1.3 {
|
||||||
INSERT INTO t1 SELECT a+3, randomblob(1500) FROM t1
|
INSERT INTO t1 SELECT a+3, randomblob(1500) FROM t1
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: counter}}
|
||||||
do_execsql_test pager1-3.4 { SELECT * FROM counter } {3 0}
|
do_execsql_test pager1-3.4 { SELECT * FROM counter } {3 0}
|
||||||
do_execsql_test pager1-3.5 { SELECT a FROM t1 } {1 2 3}
|
do_execsql_test pager1-3.5 { SELECT a FROM t1 } {1 2 3}
|
||||||
do_execsql_test pager1-3.6 { COMMIT } {}
|
do_execsql_test pager1-3.6 { COMMIT } {}
|
||||||
@ -1703,7 +1703,7 @@ do_catchsql_test pager1-14.1.4 {
|
|||||||
BEGIN;
|
BEGIN;
|
||||||
INSERT INTO t1(rowid, a, b) SELECT a+3, b, b FROM t1;
|
INSERT INTO t1(rowid, a, b) SELECT a+3, b, b FROM t1;
|
||||||
INSERT INTO t1(rowid, a, b) SELECT a+3, b, b FROM t1;
|
INSERT INTO t1(rowid, a, b) SELECT a+3, b, b FROM t1;
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.rowid}}
|
||||||
do_execsql_test pager1-14.1.5 {
|
do_execsql_test pager1-14.1.5 {
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
@ -54,7 +54,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t3 SELECT a FROM t1;
|
INSERT INTO t3 SELECT a FROM t1;
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t3.a}}
|
||||||
|
|
||||||
# Try to continue with the SELECT statement
|
# Try to continue with the SELECT statement
|
||||||
#
|
#
|
||||||
|
@ -858,7 +858,7 @@ do_test savepoint-12.2 {
|
|||||||
SAVEPOINT sp2;
|
SAVEPOINT sp2;
|
||||||
INSERT OR ROLLBACK INTO t4 VALUES(1, 'one');
|
INSERT OR ROLLBACK INTO t4 VALUES(1, 'one');
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t4.a}}
|
||||||
do_test savepoint-12.3 {
|
do_test savepoint-12.3 {
|
||||||
sqlite3_get_autocommit db
|
sqlite3_get_autocommit db
|
||||||
} {1}
|
} {1}
|
||||||
|
@ -30,7 +30,7 @@ do_test schema5-1.1 {
|
|||||||
} {1 2 3}
|
} {1 2 3}
|
||||||
do_test schema5-1.2 {
|
do_test schema5-1.2 {
|
||||||
catchsql {INSERT INTO t1 VALUES(1,3,4);}
|
catchsql {INSERT INTO t1 VALUES(1,3,4);}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test schema5-1.3 {
|
do_test schema5-1.3 {
|
||||||
db eval {
|
db eval {
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
@ -44,7 +44,7 @@ do_test schema5-1.3 {
|
|||||||
} {1 2 3}
|
} {1 2 3}
|
||||||
do_test schema5-1.4 {
|
do_test schema5-1.4 {
|
||||||
catchsql {INSERT INTO t1 VALUES(10,11,12);}
|
catchsql {INSERT INTO t1 VALUES(10,11,12);}
|
||||||
} {1 {constraint two failed}}
|
} {1 {CHECK constraint failed: two}}
|
||||||
do_test schema5-1.5 {
|
do_test schema5-1.5 {
|
||||||
db eval {
|
db eval {
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
@ -57,10 +57,10 @@ do_test schema5-1.5 {
|
|||||||
} {}
|
} {}
|
||||||
do_test schema5-1.6 {
|
do_test schema5-1.6 {
|
||||||
catchsql {INSERT INTO t1 VALUES(1,3,4)}
|
catchsql {INSERT INTO t1 VALUES(1,3,4)}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test schema5-1.7 {
|
do_test schema5-1.7 {
|
||||||
catchsql {INSERT INTO t1 VALUES(10,2,3)}
|
catchsql {INSERT INTO t1 VALUES(10,2,3)}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.b, t1.c}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ do_test table-10.1 {
|
|||||||
CREATE TABLE t6(a REFERENCES t4(a) NOT NULL);
|
CREATE TABLE t6(a REFERENCES t4(a) NOT NULL);
|
||||||
INSERT INTO t6 VALUES(NULL);
|
INSERT INTO t6 VALUES(NULL);
|
||||||
}
|
}
|
||||||
} {1 {t6.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t6.a}}
|
||||||
do_test table-10.2 {
|
do_test table-10.2 {
|
||||||
catchsql {
|
catchsql {
|
||||||
DROP TABLE t6;
|
DROP TABLE t6;
|
||||||
|
@ -31,7 +31,7 @@ do_test tkt-4a03ed-1.1 {
|
|||||||
INSERT INTO t1 VALUES(1, 2);
|
INSERT INTO t1 VALUES(1, 2);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t1.b}}
|
||||||
do_test tkt-4a03ed-1.2 {
|
do_test tkt-4a03ed-1.2 {
|
||||||
db eval {
|
db eval {
|
||||||
PRAGMA integrity_check;
|
PRAGMA integrity_check;
|
||||||
|
@ -29,7 +29,7 @@ do_test tkt-78e04-1.1 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO ""("") VALUES(1);
|
INSERT INTO ""("") VALUES(1);
|
||||||
}
|
}
|
||||||
} {1 {column is not unique}}
|
} {1 {UNIQUE constraint failed: .}}
|
||||||
do_test tkt-78e04-1.2 {
|
do_test tkt-78e04-1.2 {
|
||||||
execsql {
|
execsql {
|
||||||
PRAGMA table_info("");
|
PRAGMA table_info("");
|
||||||
|
@ -98,7 +98,7 @@ do_catchsql_test 3.2 {
|
|||||||
DROP TABLE pp1;
|
DROP TABLE pp1;
|
||||||
DROP TABLE cc1;
|
DROP TABLE cc1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_catchsql_test 3.3 {
|
do_catchsql_test 3.3 {
|
||||||
DROP TABLE cc2;
|
DROP TABLE cc2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -40,7 +40,7 @@ do_test tkt1567-1.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t1 SET a = CASE WHEN rowid<90 THEN substr(a,1,10) ELSE '9999' END;
|
UPDATE t1 SET a = CASE WHEN rowid<90 THEN substr(a,1,10) ELSE '9999' END;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test tkt1567-1.5 {
|
do_test tkt1567-1.5 {
|
||||||
execsql {
|
execsql {
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@ -71,7 +71,7 @@ do_test tkt1567-2.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t2 SET a = CASE WHEN rowid<90 THEN substr(a,1,10) ELSE '9999' END;
|
UPDATE t2 SET a = CASE WHEN rowid<90 THEN substr(a,1,10) ELSE '9999' END;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t2.a}}
|
||||||
do_test tkt1567-2.5 {
|
do_test tkt1567-2.5 {
|
||||||
execsql {
|
execsql {
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -74,7 +74,7 @@ do_test tkt35xx-1.2.2 {
|
|||||||
DROP TABLE t5;
|
DROP TABLE t5;
|
||||||
INSERT INTO t3(a, b) SELECT c, d FROM t4;
|
INSERT INTO t3(a, b) SELECT c, d FROM t4;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t3.a}}
|
||||||
do_test tkt35xx-1.2.3 {
|
do_test tkt35xx-1.2.3 {
|
||||||
# Show that the transaction has not been rolled back.
|
# Show that the transaction has not been rolled back.
|
||||||
catchsql BEGIN
|
catchsql BEGIN
|
||||||
|
@ -497,7 +497,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT OR ABORT INTO tbl values (2, 2, 3);
|
INSERT OR ABORT INTO tbl values (2, 2, 3);
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test trigger2-6.1c {
|
do_test trigger2-6.1c {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -507,7 +507,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT OR FAIL INTO tbl values (2, 2, 3);
|
INSERT OR FAIL INTO tbl values (2, 2, 3);
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test trigger2-6.1e {
|
do_test trigger2-6.1e {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -523,7 +523,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT OR ROLLBACK INTO tbl values (3, 2, 3);
|
INSERT OR ROLLBACK INTO tbl values (3, 2, 3);
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test trigger2-6.1h {
|
do_test trigger2-6.1h {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -551,7 +551,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE OR ABORT tbl SET a = 4 WHERE a = 1;
|
UPDATE OR ABORT tbl SET a = 4 WHERE a = 1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test trigger2-6.2c {
|
do_test trigger2-6.2c {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -561,7 +561,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE OR FAIL tbl SET a = 4 WHERE a = 1;
|
UPDATE OR FAIL tbl SET a = 4 WHERE a = 1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test trigger2-6.2e {
|
do_test trigger2-6.2e {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -583,7 +583,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE OR ROLLBACK tbl SET a = 4 WHERE a = 1;
|
UPDATE OR ROLLBACK tbl SET a = 4 WHERE a = 1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test trigger2-6.2h {
|
do_test trigger2-6.2h {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
|
@ -157,7 +157,7 @@ do_test triggerC-1.14 {
|
|||||||
} {}
|
} {}
|
||||||
do_test triggerC-1.15 {
|
do_test triggerC-1.15 {
|
||||||
catchsql { UPDATE OR ROLLBACK t1 SET a=100 }
|
catchsql { UPDATE OR ROLLBACK t1 SET a=100 }
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -47,7 +47,7 @@ do_test unique-1.3 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1(a,b,c) VALUES(1,3,4)
|
INSERT INTO t1(a,b,c) VALUES(1,3,4)
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
verify_ex_errcode unique-1.3b SQLITE_CONSTRAINT_PRIMARYKEY
|
verify_ex_errcode unique-1.3b SQLITE_CONSTRAINT_PRIMARYKEY
|
||||||
do_test unique-1.4 {
|
do_test unique-1.4 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -58,7 +58,7 @@ do_test unique-1.5 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1(a,b,c) VALUES(3,2,4)
|
INSERT INTO t1(a,b,c) VALUES(3,2,4)
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t1.b}}
|
||||||
verify_ex_errcode unique-1.5b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode unique-1.5b SQLITE_CONSTRAINT_UNIQUE
|
||||||
do_test unique-1.6 {
|
do_test unique-1.6 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -100,7 +100,7 @@ do_test unique-2.3 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t2 VALUES(1,5);
|
INSERT INTO t2 VALUES(1,5);
|
||||||
}
|
}
|
||||||
} {1 {column a is not unique}}
|
} {1 {UNIQUE constraint failed: t2.a}}
|
||||||
verify_ex_errcode unique-2.3b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode unique-2.3b SQLITE_CONSTRAINT_UNIQUE
|
||||||
do_test unique-2.4 {
|
do_test unique-2.4 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -127,7 +127,7 @@ do_test unique-2.8 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
CREATE UNIQUE INDEX i2 ON t2(a);
|
CREATE UNIQUE INDEX i2 ON t2(a);
|
||||||
}
|
}
|
||||||
} {1 {indexed columns are not unique}}
|
} {1 {UNIQUE constraint failed: t2.a}}
|
||||||
verify_ex_errcode unique-2.8b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode unique-2.8b SQLITE_CONSTRAINT_UNIQUE
|
||||||
do_test unique-2.9 {
|
do_test unique-2.9 {
|
||||||
catchsql {
|
catchsql {
|
||||||
@ -166,7 +166,7 @@ do_test unique-3.4 {
|
|||||||
INSERT INTO t3(a,b,c,d) VALUES(1,4,3,5);
|
INSERT INTO t3(a,b,c,d) VALUES(1,4,3,5);
|
||||||
SELECT * FROM t3 ORDER BY a,b,c,d;
|
SELECT * FROM t3 ORDER BY a,b,c,d;
|
||||||
}
|
}
|
||||||
} {1 {columns a, c, d are not unique}}
|
} {1 {UNIQUE constraint failed: t3.a, t3.c, t3.d}}
|
||||||
verify_ex_errcode unique-3.4b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode unique-3.4b SQLITE_CONSTRAINT_UNIQUE
|
||||||
integrity_check unique-3.5
|
integrity_check unique-3.5
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ do_test unique-4.9 {
|
|||||||
} {0 {}}
|
} {0 {}}
|
||||||
do_test unique-4.10 {
|
do_test unique-4.10 {
|
||||||
catchsql {CREATE UNIQUE INDEX i4c ON t4(b)}
|
catchsql {CREATE UNIQUE INDEX i4c ON t4(b)}
|
||||||
} {1 {indexed columns are not unique}}
|
} {1 {UNIQUE constraint failed: t4.b}}
|
||||||
verify_ex_errcode unique-4.10b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode unique-4.10b SQLITE_CONSTRAINT_UNIQUE
|
||||||
integrity_check unique-4.99
|
integrity_check unique-4.99
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ do_test unique-5.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t5 VALUES(1,2,3,4,5,6);
|
INSERT INTO t5 VALUES(1,2,3,4,5,6);
|
||||||
}
|
}
|
||||||
} {1 {columns first_column_with_long_name, second_column_with_long_name, third_column_with_long_name, fourth_column_with_long_name, fifth_column_with_long_name, sixth_column_with_long_name are not unique}}
|
} {1 {UNIQUE constraint failed: t5.first_column_with_long_name, t5.second_column_with_long_name, t5.third_column_with_long_name, t5.fourth_column_with_long_name, t5.fifth_column_with_long_name, t5.sixth_column_with_long_name}}
|
||||||
verify_ex_errcode unique-5.2b SQLITE_CONSTRAINT_UNIQUE
|
verify_ex_errcode unique-5.2b SQLITE_CONSTRAINT_UNIQUE
|
||||||
|
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ do_test update-10.3 {
|
|||||||
UPDATE t1 SET a=1, e=10 WHERE f=7;
|
UPDATE t1 SET a=1, e=10 WHERE f=7;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.a}}
|
||||||
do_test update-10.4 {
|
do_test update-10.4 {
|
||||||
catchsql {
|
catchsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -469,7 +469,7 @@ do_test update-10.6 {
|
|||||||
UPDATE t1 SET b=2, e=12 WHERE f=7;
|
UPDATE t1 SET b=2, e=12 WHERE f=7;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
}
|
}
|
||||||
} {1 {column b is not unique}}
|
} {1 {UNIQUE constraint failed: t1.b}}
|
||||||
do_test update-10.7 {
|
do_test update-10.7 {
|
||||||
catchsql {
|
catchsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -486,7 +486,7 @@ do_test update-10.9 {
|
|||||||
UPDATE t1 SET c=3, d=4, e=14 WHERE f=7;
|
UPDATE t1 SET c=3, d=4, e=14 WHERE f=7;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
}
|
}
|
||||||
} {1 {columns c, d are not unique}}
|
} {1 {UNIQUE constraint failed: t1.c, t1.d}}
|
||||||
do_test update-10.10 {
|
do_test update-10.10 {
|
||||||
catchsql {
|
catchsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
@ -1040,10 +1040,10 @@ do_test vtab1.12-1 {
|
|||||||
# First test outside of a transaction.
|
# First test outside of a transaction.
|
||||||
do_test vtab1.12-2 {
|
do_test vtab1.12-2 {
|
||||||
catchsql { INSERT INTO echo_c SELECT * FROM b; }
|
catchsql { INSERT INTO echo_c SELECT * FROM b; }
|
||||||
} {1 {echo-vtab-error: column a is not unique}}
|
} {1 {echo-vtab-error: UNIQUE constraint failed: c.a}}
|
||||||
do_test vtab1.12-2.1 {
|
do_test vtab1.12-2.1 {
|
||||||
sqlite3_errmsg db
|
sqlite3_errmsg db
|
||||||
} {echo-vtab-error: column a is not unique}
|
} {echo-vtab-error: UNIQUE constraint failed: c.a}
|
||||||
do_test vtab1.12-3 {
|
do_test vtab1.12-3 {
|
||||||
execsql { SELECT * FROM c }
|
execsql { SELECT * FROM c }
|
||||||
} {3 G H}
|
} {3 G H}
|
||||||
@ -1052,7 +1052,7 @@ do_test vtab1.12-3 {
|
|||||||
do_test vtab1.12-4 {
|
do_test vtab1.12-4 {
|
||||||
execsql {BEGIN}
|
execsql {BEGIN}
|
||||||
catchsql { INSERT INTO echo_c SELECT * FROM b; }
|
catchsql { INSERT INTO echo_c SELECT * FROM b; }
|
||||||
} {1 {echo-vtab-error: column a is not unique}}
|
} {1 {echo-vtab-error: UNIQUE constraint failed: c.a}}
|
||||||
do_test vtab1.12-5 {
|
do_test vtab1.12-5 {
|
||||||
execsql { SELECT * FROM c }
|
execsql { SELECT * FROM c }
|
||||||
} {3 G H}
|
} {3 G H}
|
||||||
|
@ -322,7 +322,7 @@ do_test wal-5.4 {
|
|||||||
INSERT INTO t3 VALUES('abc');
|
INSERT INTO t3 VALUES('abc');
|
||||||
}
|
}
|
||||||
catchsql { INSERT INTO t3 VALUES('abc') }
|
catchsql { INSERT INTO t3 VALUES('abc') }
|
||||||
} {1 {column x is not unique}}
|
} {1 {UNIQUE constraint failed: t3.x}}
|
||||||
do_test wal-5.5 {
|
do_test wal-5.5 {
|
||||||
execsql {
|
execsql {
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -52,7 +52,7 @@ do_test without_rowid1-1.21 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO t1 VALUES('dynamic','phone','flipper','harvard');
|
INSERT INTO t1 VALUES('dynamic','phone','flipper','harvard');
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: t1.c, t1.a}}
|
||||||
|
|
||||||
# REPLACE INTO works, however.
|
# REPLACE INTO works, however.
|
||||||
#
|
#
|
||||||
|
@ -105,37 +105,37 @@ set FkeySimpleSchema {
|
|||||||
|
|
||||||
|
|
||||||
set FkeySimpleTests {
|
set FkeySimpleTests {
|
||||||
1.1 "INSERT INTO t2 VALUES(1, 3)" {1 {foreign key constraint failed}}
|
1.1 "INSERT INTO t2 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.2 "INSERT INTO t1 VALUES(1, 2)" {0 {}}
|
1.2 "INSERT INTO t1 VALUES(1, 2)" {0 {}}
|
||||||
1.3 "INSERT INTO t2 VALUES(1, 3)" {0 {}}
|
1.3 "INSERT INTO t2 VALUES(1, 3)" {0 {}}
|
||||||
1.4 "INSERT INTO t2 VALUES(2, 4)" {1 {foreign key constraint failed}}
|
1.4 "INSERT INTO t2 VALUES(2, 4)" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.5 "INSERT INTO t2 VALUES(NULL, 4)" {0 {}}
|
1.5 "INSERT INTO t2 VALUES(NULL, 4)" {0 {}}
|
||||||
1.6 "UPDATE t2 SET c=2 WHERE d=4" {1 {foreign key constraint failed}}
|
1.6 "UPDATE t2 SET c=2 WHERE d=4" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.7 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
|
1.7 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
|
||||||
1.9 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
|
1.9 "UPDATE t2 SET c=1 WHERE d=4" {0 {}}
|
||||||
1.10 "UPDATE t2 SET c=NULL WHERE d=4" {0 {}}
|
1.10 "UPDATE t2 SET c=NULL WHERE d=4" {0 {}}
|
||||||
1.11 "DELETE FROM t1 WHERE a=1" {1 {foreign key constraint failed}}
|
1.11 "DELETE FROM t1 WHERE a=1" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.12 "UPDATE t1 SET a = 2" {1 {foreign key constraint failed}}
|
1.12 "UPDATE t1 SET a = 2" {1 {FOREIGN KEY constraint failed}}
|
||||||
1.13 "UPDATE t1 SET a = 1" {0 {}}
|
1.13 "UPDATE t1 SET a = 1" {0 {}}
|
||||||
|
|
||||||
2.1 "INSERT INTO t4 VALUES(1, 3)" {1 {foreign key constraint failed}}
|
2.1 "INSERT INTO t4 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
|
||||||
2.2 "INSERT INTO t3 VALUES(1, 2)" {0 {}}
|
2.2 "INSERT INTO t3 VALUES(1, 2)" {0 {}}
|
||||||
2.3 "INSERT INTO t4 VALUES(1, 3)" {0 {}}
|
2.3 "INSERT INTO t4 VALUES(1, 3)" {0 {}}
|
||||||
|
|
||||||
4.1 "INSERT INTO t8 VALUES(1, 3)" {1 {foreign key constraint failed}}
|
4.1 "INSERT INTO t8 VALUES(1, 3)" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.2 "INSERT INTO t7 VALUES(2, 1)" {0 {}}
|
4.2 "INSERT INTO t7 VALUES(2, 1)" {0 {}}
|
||||||
4.3 "INSERT INTO t8 VALUES(1, 3)" {0 {}}
|
4.3 "INSERT INTO t8 VALUES(1, 3)" {0 {}}
|
||||||
4.4 "INSERT INTO t8 VALUES(2, 4)" {1 {foreign key constraint failed}}
|
4.4 "INSERT INTO t8 VALUES(2, 4)" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.5 "INSERT INTO t8 VALUES(NULL, 4)" {0 {}}
|
4.5 "INSERT INTO t8 VALUES(NULL, 4)" {0 {}}
|
||||||
4.6 "UPDATE t8 SET c=2 WHERE d=4" {1 {foreign key constraint failed}}
|
4.6 "UPDATE t8 SET c=2 WHERE d=4" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.7 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
|
4.7 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
|
||||||
4.9 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
|
4.9 "UPDATE t8 SET c=1 WHERE d=4" {0 {}}
|
||||||
4.10 "UPDATE t8 SET c=NULL WHERE d=4" {0 {}}
|
4.10 "UPDATE t8 SET c=NULL WHERE d=4" {0 {}}
|
||||||
4.11 "DELETE FROM t7 WHERE b=1" {1 {foreign key constraint failed}}
|
4.11 "DELETE FROM t7 WHERE b=1" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.12 "UPDATE t7 SET b = 2" {1 {foreign key constraint failed}}
|
4.12 "UPDATE t7 SET b = 2" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.13 "UPDATE t7 SET b = 1" {0 {}}
|
4.13 "UPDATE t7 SET b = 1" {0 {}}
|
||||||
4.14 "INSERT INTO t8 VALUES('a', 'b')" {1 {foreign key constraint failed}}
|
4.14 "INSERT INTO t8 VALUES('a', 'b')" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.15 "UPDATE t7 SET b = 5" {1 {foreign key constraint failed}}
|
4.15 "UPDATE t7 SET b = 5" {1 {FOREIGN KEY constraint failed}}
|
||||||
4.17 "UPDATE t7 SET a = 10" {0 {}}
|
4.17 "UPDATE t7 SET a = 10" {0 {}}
|
||||||
|
|
||||||
5.1 "INSERT INTO t9 VALUES(1, 3)" {1 {no such table: main.nosuchtable}}
|
5.1 "INSERT INTO t9 VALUES(1, 3)" {1 {no such table: main.nosuchtable}}
|
||||||
@ -215,7 +215,7 @@ do_test without_rowid3-1.5.1 {
|
|||||||
} {35.0 text}
|
} {35.0 text}
|
||||||
do_test without_rowid3-1.5.2 {
|
do_test without_rowid3-1.5.2 {
|
||||||
catchsql { DELETE FROM i }
|
catchsql { DELETE FROM i }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
# Same test using a regular primary key with integer affinity.
|
# Same test using a regular primary key with integer affinity.
|
||||||
drop_all_tables
|
drop_all_tables
|
||||||
@ -231,7 +231,7 @@ do_test without_rowid3-1.6.1 {
|
|||||||
} {35.0 text 35 integer}
|
} {35.0 text 35 integer}
|
||||||
do_test without_rowid3-1.6.2 {
|
do_test without_rowid3-1.6.2 {
|
||||||
catchsql { DELETE FROM i }
|
catchsql { DELETE FROM i }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
# Use a collation sequence on the parent key.
|
# Use a collation sequence on the parent key.
|
||||||
drop_all_tables
|
drop_all_tables
|
||||||
@ -243,7 +243,7 @@ do_test without_rowid3-1.7.1 {
|
|||||||
INSERT INTO j VALUES('sqlite');
|
INSERT INTO j VALUES('sqlite');
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM i }
|
catchsql { DELETE FROM i }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
# Use the parent key collation even if it is default and the child key
|
# Use the parent key collation even if it is default and the child key
|
||||||
# has an explicit value.
|
# has an explicit value.
|
||||||
@ -255,7 +255,7 @@ do_test without_rowid3-1.7.2 {
|
|||||||
INSERT INTO i VALUES('SQLite');
|
INSERT INTO i VALUES('SQLite');
|
||||||
}
|
}
|
||||||
catchsql { INSERT INTO j VALUES('sqlite') }
|
catchsql { INSERT INTO j VALUES('sqlite') }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-1.7.3 {
|
do_test without_rowid3-1.7.3 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO i VALUES('sqlite');
|
INSERT INTO i VALUES('sqlite');
|
||||||
@ -263,7 +263,7 @@ do_test without_rowid3-1.7.3 {
|
|||||||
DELETE FROM i WHERE i = 'SQLite';
|
DELETE FROM i WHERE i = 'SQLite';
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM i WHERE i = 'sqlite' }
|
catchsql { DELETE FROM i WHERE i = 'sqlite' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# This section (test cases without_rowid3-2.*) contains tests to check that the
|
# This section (test cases without_rowid3-2.*) contains tests to check that the
|
||||||
@ -271,7 +271,7 @@ do_test without_rowid3-1.7.3 {
|
|||||||
#
|
#
|
||||||
proc without_rowid3-2-test {tn nocommit sql {res {}}} {
|
proc without_rowid3-2-test {tn nocommit sql {res {}}} {
|
||||||
if {$res eq "FKV"} {
|
if {$res eq "FKV"} {
|
||||||
set expected {1 {foreign key constraint failed}}
|
set expected {1 {FOREIGN KEY constraint failed}}
|
||||||
} else {
|
} else {
|
||||||
set expected [list 0 $res]
|
set expected [list 0 $res]
|
||||||
}
|
}
|
||||||
@ -279,7 +279,7 @@ proc without_rowid3-2-test {tn nocommit sql {res {}}} {
|
|||||||
if {$nocommit} {
|
if {$nocommit} {
|
||||||
do_test without_rowid3-2.${tn}c {
|
do_test without_rowid3-2.${tn}c {
|
||||||
catchsql COMMIT
|
catchsql COMMIT
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ without_rowid3-2-test 65 1 "INSERT INTO leaf VALUES('b', 2)"
|
|||||||
without_rowid3-2-test 66 1 "INSERT INTO leaf VALUES('c', 1)"
|
without_rowid3-2-test 66 1 "INSERT INTO leaf VALUES('c', 1)"
|
||||||
do_test without_rowid3-2-test-67 {
|
do_test without_rowid3-2-test-67 {
|
||||||
catchsql "INSERT INTO node SELECT parent, 3 FROM leaf"
|
catchsql "INSERT INTO node SELECT parent, 3 FROM leaf"
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: node.nodeid}}
|
||||||
without_rowid3-2-test 68 0 "COMMIT" FKV
|
without_rowid3-2-test 68 0 "COMMIT" FKV
|
||||||
without_rowid3-2-test 69 1 "INSERT INTO node VALUES(1, NULL)"
|
without_rowid3-2-test 69 1 "INSERT INTO node VALUES(1, NULL)"
|
||||||
without_rowid3-2-test 70 0 "INSERT INTO node VALUES(2, NULL)"
|
without_rowid3-2-test 70 0 "INSERT INTO node VALUES(2, NULL)"
|
||||||
@ -417,14 +417,14 @@ do_test without_rowid3-3.1.2 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-3.1.3 {
|
do_test without_rowid3-3.1.3 {
|
||||||
catchsql { UPDATE ab SET a = 5 }
|
catchsql { UPDATE ab SET a = 5 }
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: ef}}
|
||||||
do_test without_rowid3-3.1.4 {
|
do_test without_rowid3-3.1.4 {
|
||||||
execsql { SELECT * FROM ab }
|
execsql { SELECT * FROM ab }
|
||||||
} {1 b}
|
} {1 b}
|
||||||
do_test without_rowid3-3.1.4 {
|
do_test without_rowid3-3.1.4 {
|
||||||
execsql BEGIN;
|
execsql BEGIN;
|
||||||
catchsql { UPDATE ab SET a = 5 }
|
catchsql { UPDATE ab SET a = 5 }
|
||||||
} {1 {constraint failed}}
|
} {1 {CHECK constraint failed: ef}}
|
||||||
do_test without_rowid3-3.1.5 {
|
do_test without_rowid3-3.1.5 {
|
||||||
execsql COMMIT;
|
execsql COMMIT;
|
||||||
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
|
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
|
||||||
@ -433,7 +433,7 @@ do_test without_rowid3-3.1.5 {
|
|||||||
do_test without_rowid3-3.2.1 {
|
do_test without_rowid3-3.2.1 {
|
||||||
execsql BEGIN;
|
execsql BEGIN;
|
||||||
catchsql { DELETE FROM ab }
|
catchsql { DELETE FROM ab }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-3.2.2 {
|
do_test without_rowid3-3.2.2 {
|
||||||
execsql COMMIT
|
execsql COMMIT
|
||||||
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
|
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
|
||||||
@ -544,7 +544,7 @@ do_test without_rowid3-7.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-7.2 {
|
do_test without_rowid3-7.2 {
|
||||||
catchsql { INSERT INTO t2 VALUES(1, 'A'); }
|
catchsql { INSERT INTO t2 VALUES(1, 'A'); }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-7.3 {
|
do_test without_rowid3-7.3 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO t1 VALUES(1, 2);
|
INSERT INTO t1 VALUES(1, 2);
|
||||||
@ -557,16 +557,16 @@ do_test without_rowid3-7.4 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-7.5 {
|
do_test without_rowid3-7.5 {
|
||||||
catchsql { UPDATE t2 SET c = 3 }
|
catchsql { UPDATE t2 SET c = 3 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-7.6 {
|
do_test without_rowid3-7.6 {
|
||||||
catchsql { DELETE FROM t1 WHERE a = 2 }
|
catchsql { DELETE FROM t1 WHERE a = 2 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-7.7 {
|
do_test without_rowid3-7.7 {
|
||||||
execsql { DELETE FROM t1 WHERE a = 1 }
|
execsql { DELETE FROM t1 WHERE a = 1 }
|
||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-7.8 {
|
do_test without_rowid3-7.8 {
|
||||||
catchsql { UPDATE t1 SET a = 3 }
|
catchsql { UPDATE t1 SET a = 3 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# Test that it is not possible to enable/disable FK support while a
|
# Test that it is not possible to enable/disable FK support while a
|
||||||
@ -631,7 +631,7 @@ do_test without_rowid3-9.1.4 {
|
|||||||
} {2 two}
|
} {2 two}
|
||||||
do_test without_rowid3-9.1.5 {
|
do_test without_rowid3-9.1.5 {
|
||||||
catchsql { DELETE FROM t1 }
|
catchsql { DELETE FROM t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test without_rowid3-9.2.1 {
|
do_test without_rowid3-9.2.1 {
|
||||||
execsql {
|
execsql {
|
||||||
@ -766,13 +766,13 @@ do_test without_rowid3-12.1.3 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-12.1.4 {
|
do_test without_rowid3-12.1.4 {
|
||||||
catchsql "UPDATE t1 SET b = 'five' WHERE b = 'two'"
|
catchsql "UPDATE t1 SET b = 'five' WHERE b = 'two'"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-12.1.5 {
|
do_test without_rowid3-12.1.5 {
|
||||||
execsql "DELETE FROM t1 WHERE b = 'two'"
|
execsql "DELETE FROM t1 WHERE b = 'two'"
|
||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-12.1.6 {
|
do_test without_rowid3-12.1.6 {
|
||||||
catchsql "COMMIT"
|
catchsql "COMMIT"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-12.1.7 {
|
do_test without_rowid3-12.1.7 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO t1 VALUES(2, 'two');
|
INSERT INTO t1 VALUES(2, 'two');
|
||||||
@ -814,7 +814,7 @@ do_test without_rowid3-12.2.3 {
|
|||||||
INSERT INTO t2 VALUES('b');
|
INSERT INTO t2 VALUES('b');
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM t1 }
|
catchsql { DELETE FROM t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-12.2.4 {
|
do_test without_rowid3-12.2.4 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
@ -852,14 +852,14 @@ do_test without_rowid3-12.3.2 {
|
|||||||
} {no possibly}
|
} {no possibly}
|
||||||
do_test without_rowid3-12.3.3 {
|
do_test without_rowid3-12.3.3 {
|
||||||
catchsql { INSERT INTO down(c39, c38) VALUES('yes', 'no') }
|
catchsql { INSERT INTO down(c39, c38) VALUES('yes', 'no') }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-12.3.4 {
|
do_test without_rowid3-12.3.4 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO up(c34, c35) VALUES('yes', 'no');
|
INSERT INTO up(c34, c35) VALUES('yes', 'no');
|
||||||
INSERT INTO down(c39, c38) VALUES('yes', 'no');
|
INSERT INTO down(c39, c38) VALUES('yes', 'no');
|
||||||
}
|
}
|
||||||
catchsql { DELETE FROM up WHERE c34 = 'yes' }
|
catchsql { DELETE FROM up WHERE c34 = 'yes' }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-12.3.5 {
|
do_test without_rowid3-12.3.5 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM up WHERE c34 = 'possibly';
|
DELETE FROM up WHERE c34 = 'possibly';
|
||||||
@ -886,7 +886,7 @@ foreach {tn stmt} {
|
|||||||
} {
|
} {
|
||||||
do_test without_rowid3-13.1.$tn.1 {
|
do_test without_rowid3-13.1.$tn.1 {
|
||||||
catchsql $stmt
|
catchsql $stmt
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-13.1.$tn.2 {
|
do_test without_rowid3-13.1.$tn.2 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM pp;
|
SELECT * FROM pp;
|
||||||
@ -896,7 +896,7 @@ foreach {tn stmt} {
|
|||||||
do_test without_rowid3-13.1.$tn.3 {
|
do_test without_rowid3-13.1.$tn.3 {
|
||||||
execsql BEGIN;
|
execsql BEGIN;
|
||||||
catchsql $stmt
|
catchsql $stmt
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-13.1.$tn.4 {
|
do_test without_rowid3-13.1.$tn.4 {
|
||||||
execsql {
|
execsql {
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@ -989,13 +989,13 @@ ifcapable altertable {
|
|||||||
]
|
]
|
||||||
do_test without_rowid3-14.2.2.3 {
|
do_test without_rowid3-14.2.2.3 {
|
||||||
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-14.2.2.4 {
|
do_test without_rowid3-14.2.2.4 {
|
||||||
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-14.2.2.5 {
|
do_test without_rowid3-14.2.2.5 {
|
||||||
catchsql { UPDATE t4 SET b = 5 }
|
catchsql { UPDATE t4 SET b = 5 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-14.2.2.6 {
|
do_test without_rowid3-14.2.2.6 {
|
||||||
catchsql { UPDATE t4 SET b = 1 }
|
catchsql { UPDATE t4 SET b = 1 }
|
||||||
} {0 {}}
|
} {0 {}}
|
||||||
@ -1073,13 +1073,13 @@ ifcapable altertable {
|
|||||||
]
|
]
|
||||||
do_test without_rowid3-14.2tmp.2.3 {
|
do_test without_rowid3-14.2tmp.2.3 {
|
||||||
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-14.2tmp.2.4 {
|
do_test without_rowid3-14.2tmp.2.4 {
|
||||||
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-14.2tmp.2.5 {
|
do_test without_rowid3-14.2tmp.2.5 {
|
||||||
catchsql { UPDATE t4 SET b = 5 }
|
catchsql { UPDATE t4 SET b = 5 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-14.2tmp.2.6 {
|
do_test without_rowid3-14.2tmp.2.6 {
|
||||||
catchsql { UPDATE t4 SET b = 1 }
|
catchsql { UPDATE t4 SET b = 1 }
|
||||||
} {0 {}}
|
} {0 {}}
|
||||||
@ -1158,13 +1158,13 @@ ifcapable altertable {
|
|||||||
]
|
]
|
||||||
do_test without_rowid3-14.2aux.2.3 {
|
do_test without_rowid3-14.2aux.2.3 {
|
||||||
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
catchsql { INSERT INTO t3 VALUES(1, 2, 3) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-14.2aux.2.4 {
|
do_test without_rowid3-14.2aux.2.4 {
|
||||||
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
execsql { INSERT INTO t4 VALUES(1, NULL) }
|
||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-14.2aux.2.5 {
|
do_test without_rowid3-14.2aux.2.5 {
|
||||||
catchsql { UPDATE t4 SET b = 5 }
|
catchsql { UPDATE t4 SET b = 5 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-14.2aux.2.6 {
|
do_test without_rowid3-14.2aux.2.6 {
|
||||||
catchsql { UPDATE t4 SET b = 1 }
|
catchsql { UPDATE t4 SET b = 1 }
|
||||||
} {0 {}}
|
} {0 {}}
|
||||||
@ -1190,7 +1190,7 @@ do_test without_rowid3-2.14.3.2 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-2.14.3.3 {
|
do_test without_rowid3-2.14.3.3 {
|
||||||
catchsql { DROP TABLE t1 }
|
catchsql { DROP TABLE t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-2.14.3.4 {
|
do_test without_rowid3-2.14.3.4 {
|
||||||
execsql {
|
execsql {
|
||||||
DELETE FROM t2;
|
DELETE FROM t2;
|
||||||
@ -1209,7 +1209,7 @@ do_test without_rowid3-2.14.3.5 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-2.14.3.6 {
|
do_test without_rowid3-2.14.3.6 {
|
||||||
catchsql { DROP TABLE t1 }
|
catchsql { DROP TABLE t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-2.14.3.7 {
|
do_test without_rowid3-2.14.3.7 {
|
||||||
execsql {
|
execsql {
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
@ -1369,15 +1369,15 @@ foreach {tn zSchema} {
|
|||||||
|
|
||||||
do_test without_rowid3-16.1.$tn.3 {
|
do_test without_rowid3-16.1.$tn.3 {
|
||||||
catchsql { UPDATE self SET b = 15 }
|
catchsql { UPDATE self SET b = 15 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test without_rowid3-16.1.$tn.4 {
|
do_test without_rowid3-16.1.$tn.4 {
|
||||||
catchsql { UPDATE self SET a = 15 }
|
catchsql { UPDATE self SET a = 15 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test without_rowid3-16.1.$tn.5 {
|
do_test without_rowid3-16.1.$tn.5 {
|
||||||
catchsql { UPDATE self SET a = 15, b = 16 }
|
catchsql { UPDATE self SET a = 15, b = 16 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test without_rowid3-16.1.$tn.6 {
|
do_test without_rowid3-16.1.$tn.6 {
|
||||||
catchsql { UPDATE self SET a = 17, b = 17 }
|
catchsql { UPDATE self SET a = 17, b = 17 }
|
||||||
@ -1388,7 +1388,7 @@ foreach {tn zSchema} {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-16.1.$tn.8 {
|
do_test without_rowid3-16.1.$tn.8 {
|
||||||
catchsql { INSERT INTO self VALUES(20, 21) }
|
catchsql { INSERT INTO self VALUES(20, 21) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Additional tests cases using multi-column self-referential
|
# Additional tests cases using multi-column self-referential
|
||||||
@ -1422,13 +1422,13 @@ do_test without_rowid3-16.4.1.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t1 SET c=11, e=22 WHERE a=1;
|
UPDATE t1 SET c=11, e=22 WHERE a=1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test without_rowid3-16.4.1.5 {
|
do_test without_rowid3-16.4.1.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t1 SET d=11, f=22 WHERE a=1;
|
UPDATE t1 SET d=11, f=22 WHERE a=1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_execsql_test without_rowid3-16.4.1.6 {
|
do_execsql_test without_rowid3-16.4.1.6 {
|
||||||
DELETE FROM t1 WHERE a=1;
|
DELETE FROM t1 WHERE a=1;
|
||||||
@ -1462,13 +1462,13 @@ do_test without_rowid3-16.4.2.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t1 SET c=11, e=22 WHERE a=1;
|
UPDATE t1 SET c=11, e=22 WHERE a=1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_test without_rowid3-16.4.2.5 {
|
do_test without_rowid3-16.4.2.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE t1 SET d=11, f=22 WHERE a=1;
|
UPDATE t1 SET d=11, f=22 WHERE a=1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
do_execsql_test without_rowid3-16.4.2.6 {
|
do_execsql_test without_rowid3-16.4.2.6 {
|
||||||
DELETE FROM t1 WHERE a=1;
|
DELETE FROM t1 WHERE a=1;
|
||||||
@ -1530,7 +1530,7 @@ do_test without_rowid3-17.1.6 {
|
|||||||
INSERT INTO one VALUES(0, 0, 0);
|
INSERT INTO one VALUES(0, 0, 0);
|
||||||
UPDATE two SET e=e+1, f=f+1;
|
UPDATE two SET e=e+1, f=f+1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-17.1.7 {
|
do_test without_rowid3-17.1.7 {
|
||||||
execsql { SELECT * FROM one }
|
execsql { SELECT * FROM one }
|
||||||
} {1 2 3 2 3 4 3 4 5 0 0 0}
|
} {1 2 3 2 3 4 3 4 5 0 0 0}
|
||||||
@ -1686,7 +1686,7 @@ ifcapable auth {
|
|||||||
}
|
}
|
||||||
do_test without_rowid3-18.8 {
|
do_test without_rowid3-18.8 {
|
||||||
catchsql { INSERT INTO short VALUES(1, 3, 2) }
|
catchsql { INSERT INTO short VALUES(1, 3, 2) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-18.9 {
|
do_test without_rowid3-18.9 {
|
||||||
execsql { INSERT INTO short VALUES(1, 3, NULL) }
|
execsql { INSERT INTO short VALUES(1, 3, NULL) }
|
||||||
} {}
|
} {}
|
||||||
@ -1695,7 +1695,7 @@ ifcapable auth {
|
|||||||
} {1 3 2 1 3 {}}
|
} {1 3 2 1 3 {}}
|
||||||
do_test without_rowid3-18.11 {
|
do_test without_rowid3-18.11 {
|
||||||
catchsql { UPDATE short SET f = 2 WHERE f IS NULL }
|
catchsql { UPDATE short SET f = 2 WHERE f IS NULL }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
db auth {}
|
db auth {}
|
||||||
unset authargs
|
unset authargs
|
||||||
@ -1747,7 +1747,7 @@ foreach {tn insert} {
|
|||||||
} {
|
} {
|
||||||
do_test without_rowid3-20.2.$tn.1 {
|
do_test without_rowid3-20.2.$tn.1 {
|
||||||
catchsql "$insert INTO cc VALUES(1, 2)"
|
catchsql "$insert INTO cc VALUES(1, 2)"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-20.2.$tn.2 {
|
do_test without_rowid3-20.2.$tn.2 {
|
||||||
execsql { SELECT * FROM cc }
|
execsql { SELECT * FROM cc }
|
||||||
} {}
|
} {}
|
||||||
@ -1758,7 +1758,7 @@ foreach {tn insert} {
|
|||||||
INSERT INTO cc VALUES(1, 2);
|
INSERT INTO cc VALUES(1, 2);
|
||||||
}
|
}
|
||||||
catchsql "$insert INTO cc VALUES(3, 4)"
|
catchsql "$insert INTO cc VALUES(3, 4)"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-20.2.$tn.4 {
|
do_test without_rowid3-20.2.$tn.4 {
|
||||||
execsql { COMMIT ; SELECT * FROM cc }
|
execsql { COMMIT ; SELECT * FROM cc }
|
||||||
} {1 2}
|
} {1 2}
|
||||||
@ -1783,13 +1783,13 @@ foreach {tn update} {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-20.3.$tn.2 {
|
do_test without_rowid3-20.3.$tn.2 {
|
||||||
catchsql "$update pp SET a = 1"
|
catchsql "$update pp SET a = 1"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-20.3.$tn.3 {
|
do_test without_rowid3-20.3.$tn.3 {
|
||||||
execsql { SELECT * FROM pp }
|
execsql { SELECT * FROM pp }
|
||||||
} {2 two}
|
} {2 two}
|
||||||
do_test without_rowid3-20.3.$tn.4 {
|
do_test without_rowid3-20.3.$tn.4 {
|
||||||
catchsql "$update cc SET d = 1"
|
catchsql "$update cc SET d = 1"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-20.3.$tn.5 {
|
do_test without_rowid3-20.3.$tn.5 {
|
||||||
execsql { SELECT * FROM cc }
|
execsql { SELECT * FROM cc }
|
||||||
} {1 2}
|
} {1 2}
|
||||||
@ -1799,7 +1799,7 @@ foreach {tn update} {
|
|||||||
INSERT INTO pp VALUES(3, 'three');
|
INSERT INTO pp VALUES(3, 'three');
|
||||||
}
|
}
|
||||||
catchsql "$update pp SET a = 1 WHERE a = 2"
|
catchsql "$update pp SET a = 1 WHERE a = 2"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-20.3.$tn.7 {
|
do_test without_rowid3-20.3.$tn.7 {
|
||||||
execsql { COMMIT ; SELECT * FROM pp }
|
execsql { COMMIT ; SELECT * FROM pp }
|
||||||
} {2 two 3 three}
|
} {2 two 3 three}
|
||||||
@ -1809,7 +1809,7 @@ foreach {tn update} {
|
|||||||
INSERT INTO cc VALUES(2, 2);
|
INSERT INTO cc VALUES(2, 2);
|
||||||
}
|
}
|
||||||
catchsql "$update cc SET d = 1 WHERE c = 1"
|
catchsql "$update cc SET d = 1 WHERE c = 1"
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-20.3.$tn.9 {
|
do_test without_rowid3-20.3.$tn.9 {
|
||||||
execsql { COMMIT ; SELECT * FROM cc }
|
execsql { COMMIT ; SELECT * FROM cc }
|
||||||
} {1 2 2 2}
|
} {1 2 2 2}
|
||||||
@ -1835,7 +1835,7 @@ do_test without_rowid3-genfkey.1.1 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-genfkey.1.2 {
|
do_test without_rowid3-genfkey.1.2 {
|
||||||
catchsql { INSERT INTO t2 VALUES(1, 2) }
|
catchsql { INSERT INTO t2 VALUES(1, 2) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-genfkey.1.3 {
|
do_test without_rowid3-genfkey.1.3 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO t1 VALUES(1, 2, 3);
|
INSERT INTO t1 VALUES(1, 2, 3);
|
||||||
@ -1847,7 +1847,7 @@ do_test without_rowid3-genfkey.1.4 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-genfkey.1.5 {
|
do_test without_rowid3-genfkey.1.5 {
|
||||||
catchsql { UPDATE t2 SET e = 5 WHERE e IS NULL }
|
catchsql { UPDATE t2 SET e = 5 WHERE e IS NULL }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-genfkey.1.6 {
|
do_test without_rowid3-genfkey.1.6 {
|
||||||
execsql { UPDATE t2 SET e = 1 WHERE e IS NULL }
|
execsql { UPDATE t2 SET e = 1 WHERE e IS NULL }
|
||||||
} {}
|
} {}
|
||||||
@ -1856,13 +1856,13 @@ do_test without_rowid3-genfkey.1.7 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-genfkey.1.8 {
|
do_test without_rowid3-genfkey.1.8 {
|
||||||
catchsql { UPDATE t1 SET a = 10 }
|
catchsql { UPDATE t1 SET a = 10 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-genfkey.1.9 {
|
do_test without_rowid3-genfkey.1.9 {
|
||||||
catchsql { UPDATE t1 SET a = NULL }
|
catchsql { UPDATE t1 SET a = NULL }
|
||||||
} {1 {t1.a may not be NULL}}
|
} {1 {NOT NULL constraint failed: t1.a}}
|
||||||
do_test without_rowid3-genfkey.1.10 {
|
do_test without_rowid3-genfkey.1.10 {
|
||||||
catchsql { DELETE FROM t1 }
|
catchsql { DELETE FROM t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-genfkey.1.11 {
|
do_test without_rowid3-genfkey.1.11 {
|
||||||
execsql { UPDATE t2 SET e = NULL }
|
execsql { UPDATE t2 SET e = NULL }
|
||||||
} {}
|
} {}
|
||||||
@ -1882,7 +1882,7 @@ do_test without_rowid3-genfkey.1.13 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-genfkey.1.14 {
|
do_test without_rowid3-genfkey.1.14 {
|
||||||
catchsql { INSERT INTO t3 VALUES(3, 1, 4) }
|
catchsql { INSERT INTO t3 VALUES(3, 1, 4) }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-genfkey.1.15 {
|
do_test without_rowid3-genfkey.1.15 {
|
||||||
execsql {
|
execsql {
|
||||||
INSERT INTO t1 VALUES(1, 1, 4);
|
INSERT INTO t1 VALUES(1, 1, 4);
|
||||||
@ -1891,16 +1891,16 @@ do_test without_rowid3-genfkey.1.15 {
|
|||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-genfkey.1.16 {
|
do_test without_rowid3-genfkey.1.16 {
|
||||||
catchsql { DELETE FROM t1 }
|
catchsql { DELETE FROM t1 }
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-genfkey.1.17 {
|
do_test without_rowid3-genfkey.1.17 {
|
||||||
catchsql { UPDATE t1 SET b = 10}
|
catchsql { UPDATE t1 SET b = 10}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-genfkey.1.18 {
|
do_test without_rowid3-genfkey.1.18 {
|
||||||
execsql { UPDATE t1 SET a = 10}
|
execsql { UPDATE t1 SET a = 10}
|
||||||
} {}
|
} {}
|
||||||
do_test without_rowid3-genfkey.1.19 {
|
do_test without_rowid3-genfkey.1.19 {
|
||||||
catchsql { UPDATE t3 SET h = 'hello' WHERE i = 3}
|
catchsql { UPDATE t3 SET h = 'hello' WHERE i = 3}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
drop_all_tables
|
drop_all_tables
|
||||||
do_test without_rowid3-genfkey.2.1 {
|
do_test without_rowid3-genfkey.2.1 {
|
||||||
@ -2013,7 +2013,7 @@ do_test without_rowid3-dd08e5.1.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
DELETE FROM tdd08;
|
DELETE FROM tdd08;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-dd08e5.1.3 {
|
do_test without_rowid3-dd08e5.1.3 {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * FROM tdd08;
|
SELECT * FROM tdd08;
|
||||||
@ -2023,17 +2023,17 @@ do_test without_rowid3-dd08e5.1.4 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT INTO tdd08_b VALUES(400,500,300);
|
INSERT INTO tdd08_b VALUES(400,500,300);
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-dd08e5.1.5 {
|
do_test without_rowid3-dd08e5.1.5 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tdd08_b SET x=x+1;
|
UPDATE tdd08_b SET x=x+1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-dd08e5.1.6 {
|
do_test without_rowid3-dd08e5.1.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tdd08 SET a=a+1;
|
UPDATE tdd08 SET a=a+1;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# Verify that ticket ce7c133ea6cc9ccdc1a60d80441f80b6180f5eba
|
# Verify that ticket ce7c133ea6cc9ccdc1a60d80441f80b6180f5eba
|
||||||
@ -2054,12 +2054,12 @@ do_test without_rowid3-ce7c13.1.2 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tce71 set b = 201 where a = 100;
|
UPDATE tce71 set b = 201 where a = 100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-ce7c13.1.3 {
|
do_test without_rowid3-ce7c13.1.3 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tce71 set a = 101 where a = 100;
|
UPDATE tce71 set a = 101 where a = 100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-ce7c13.1.4 {
|
do_test without_rowid3-ce7c13.1.4 {
|
||||||
execsql {
|
execsql {
|
||||||
CREATE TABLE tce73(a INTEGER PRIMARY KEY, b, UNIQUE(a,b)) WITHOUT rowid;
|
CREATE TABLE tce73(a INTEGER PRIMARY KEY, b, UNIQUE(a,b)) WITHOUT rowid;
|
||||||
@ -2074,11 +2074,11 @@ do_test without_rowid3-ce7c13.1.5 {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tce73 set b = 201 where a = 100;
|
UPDATE tce73 set b = 201 where a = 100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
do_test without_rowid3-ce7c13.1.6 {
|
do_test without_rowid3-ce7c13.1.6 {
|
||||||
catchsql {
|
catchsql {
|
||||||
UPDATE tce73 set a = 101 where a = 100;
|
UPDATE tce73 set a = 101 where a = 100;
|
||||||
}
|
}
|
||||||
} {1 {foreign key constraint failed}}
|
} {1 {FOREIGN KEY constraint failed}}
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
@ -502,7 +502,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT OR ABORT INTO tbl values (2, 2, 3);
|
INSERT OR ABORT INTO tbl values (2, 2, 3);
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test without_rowid4-6.1c {
|
do_test without_rowid4-6.1c {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -512,7 +512,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT OR FAIL INTO tbl values (2, 2, 3);
|
INSERT OR FAIL INTO tbl values (2, 2, 3);
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test without_rowid4-6.1e {
|
do_test without_rowid4-6.1e {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -528,7 +528,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
INSERT OR ROLLBACK INTO tbl values (3, 2, 3);
|
INSERT OR ROLLBACK INTO tbl values (3, 2, 3);
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test without_rowid4-6.1h {
|
do_test without_rowid4-6.1h {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -556,7 +556,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE OR ABORT tbl SET a = 4 WHERE a = 1;
|
UPDATE OR ABORT tbl SET a = 4 WHERE a = 1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test without_rowid4-6.2c {
|
do_test without_rowid4-6.2c {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -566,7 +566,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE OR FAIL tbl SET a = 4 WHERE a = 1;
|
UPDATE OR FAIL tbl SET a = 4 WHERE a = 1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test without_rowid4-6.2e {
|
do_test without_rowid4-6.2e {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
@ -588,7 +588,7 @@ ifcapable conflict {
|
|||||||
catchsql {
|
catchsql {
|
||||||
UPDATE OR ROLLBACK tbl SET a = 4 WHERE a = 1;
|
UPDATE OR ROLLBACK tbl SET a = 4 WHERE a = 1;
|
||||||
}
|
}
|
||||||
} {1 {PRIMARY KEY must be unique}}
|
} {1 {UNIQUE constraint failed: tbl.a}}
|
||||||
do_test without_rowid4-6.2h {
|
do_test without_rowid4-6.2h {
|
||||||
execsql {
|
execsql {
|
||||||
SELECT * from tbl;
|
SELECT * from tbl;
|
||||||
|
Reference in New Issue
Block a user