-C Add\sthe\sconflict2.test\sscript.\s\sFix\sissues\sdiscovered\sby\sthis\sscript.
-D 2013-11-05T01:59:07.014
+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-05T13:33:55.491
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 0522b53cdc1fcfc18f3a98e0246add129136c654
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/btree.c 509722ce305471b626d3401c0631a808fd33237b
F src/btree.h bfe0e8c5759b4ec77b0d18390064a6ef3cdffaaf
F src/btreeInt.h f038e818bfadf75afbd09819ed93c26a333d39e0
-F src/build.c 309f387dae4aa267ec0371fe69b76831d639b367
+F src/build.c 6790e7b7023935b03666a0a2ab3c4da78165d661
F src/callback.c f99a8957ba2adf369645fac0db09ad8adcf1caa2
F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
F src/ctime.c ea4b7f3623a0fcb1146e7f245d7410033e86859c
F src/date.c 593c744b2623971e45affd0bde347631bdfa4625
F src/delete.c f4e0dc7b804fc0eb1a040e3e6ac7aaf341834e39
-F src/expr.c ecc2b98eb75fe5533cfdfcca6b04cfe5f0c6001f
+F src/expr.c b77efad2426619473b7762146bc9036325c263f9
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
-F src/fkey.c 24bbd27a963c8e022a79579964885cc638567c88
+F src/fkey.c c82c3aa57b4d71387092428e4bedec16bb396015
F src/func.c 2c47b65e6e00e3e9374942f28254faf8adafe398
F src/global.c 5caf4deab621abb45b4c607aad1bd21c20aac759
F src/hash.c ac3470bbf1ca4ae4e306a8ecb0fdf1731810ffe4
F src/hash.h 8890a25af81fb85a9ad7790d32eedab4b994da22
F src/hwtime.h d32741c8f4df852c7d959236615444e2b1063b08
-F src/insert.c 7f6a62008e0f70bac2e808977544de2272ba0160
+F src/insert.c 63660d2ec840c43c212fbfe3805a162e4e6eafc7
F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
F src/legacy.c 0df0b1550b9cc1f58229644735e317ac89131f12
F src/lempar.c cdf0a000315332fc9b50b62f3b5e22e080a0952b
F src/loadext.c 867c7b330b740c6c917af9956b13b81d0a048303
-F src/main.c 35931467ec026b05babb279cb8a573e62f6fe1a3
+F src/main.c 9bcfc400b5f727dd562996d0bdf507bfbcf31583
F src/malloc.c 543a8eb5508eaf4cadf55a9b503379eba2088128
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c 437c7c4af964895d4650f29881df63535caaa1fa
F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
F src/select.c 8290456f2a516abaf8cbbed5e61944d3082e497e
F src/shell.c 03d8d9b4052430343ff30d646334621f980f1202
-F src/sqlite.h.in 547a44dd4ff4d975e92a645ea2d609e543a83d0f
+F src/sqlite.h.in a8cad179541b8d171fed425a737084702ef462ef
F src/sqlite3.rc 11094cc6a157a028b301a9f06b3d03089ea37c3e
F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc
-F src/sqliteInt.h 0d272caa9b943c7e20b9c9924c6d793aece6ee0d
+F src/sqliteInt.h 765c394183e829b0d31bb022b403141ded4c2bd1
F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
F src/status.c 7ac05a5c7017d0b9f0b4bcd701228b784f987158
F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e
F src/utf.c 6fc6c88d50448c469c5c196acf21617a24f90269
F src/util.c 2fa6c821d28bbdbeec1b2a7b091a281c9ef8f918
F src/vacuum.c 3728d74919d4fb1356f9e9a13e27773db60b7179
-F src/vdbe.c 8bab888622f007944e24da09680c3517800a7a91
-F src/vdbe.h c18a2dd91c838601b867a214e43c5f66d5d001ba
+F src/vdbe.c 94da71c02856981ce5f8eccc1f01cceeaedb2468
+F src/vdbe.h 6a52f68c46ebfc1bef4cfda58fe5d94289dde216
F src/vdbeInt.h f2fa3ceccceeb757773921fb08af7c6e9f3caa1c
F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed
-F src/vdbeaux.c cf6d0bc68fd1783747909cd14387bc06ac10a4e2
+F src/vdbeaux.c 6508022e5cdd936f25f12800970727c6ef83d54c
F src/vdbeblob.c ff60adf2953e0ffc1d59541b3101c9886b03a3de
F src/vdbemem.c c84e2bc3b8ebef3fbc4c2d811cdf9413c7062c3f
F src/vdbesort.c 9d83601f9d6243fe70dd0169a2820c5ddfd48147
F test/auth3.test a4755e6a2a2fea547ffe63c874eb569e60a28eb5
F test/autoinc.test bd30d372d00045252f6c2e41b5f41455e1975acf
F test/autoindex1.test d4dfe14001dfcb74cfbd7107f45a79fc1ab6183e
-F test/autovacuum.test 9f22a7733f39c56ef6a5665d10145ac25d8cb574
+F test/autovacuum.test 941892505d2c0f410a0cb5970dfa1c7c4e5f6e74
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85
F test/backcompat.test cf76ac18830b61df960f74229e1a4107258d3ee0
F test/btreefault.test c2bcb542685eea44621275cfedbd8a13f65201e3
F test/busy.test 76b4887f8b9160ba903c1ac22e8ff406ad6ae2f0
F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
-F test/capi2.test e8b18cc61090b6e5e388f54d6b125d711d1b265a
+F test/capi2.test 011c16da245fdc0106a2785035de6b242c05e738
F test/capi3.test 56ab450125ead38846cbae7e5b6a216686c3cffa
F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4
F test/capi3c.test 93d24621c9ff84da9da060f30431e0453db1cdb0
F test/capi3d.test 6d0fc0a86d73f42dd19a7d8b7761ab9bc02277d0
F test/capi3e.test ad90088b18b0367125ff2d4b5400153fd2f99aab
F test/cast.test 4c275cbdc8202d6f9c54a3596701719868ac7dc3
-F test/check.test 1e9be446eb0bbd47a5f65955802e9632425096ab
+F test/check.test 5831ddb6f2c687782eaf2e1a07b6e17f24c4f763
F test/close.test 340bd24cc58b16c6bc01967402755027c37eb815
F test/closure01.test dbb28f1ea9eeaf0a53ec5bc0fed352e479def8c7
F test/coalesce.test cee0dccb9fbd2d494b77234bccf9dc6c6786eb91
F test/collate1.test b709989e6e6ff6e1d2bd64231c2c1d8146846c9e
F test/collate2.test 9aaa410a00734e48bcb27f3872617d6f69b2a621
F test/collate3.test 79558a286362cb9ed603c6fa543f1cda7f563f0f
-F test/collate4.test 1768c1f373eccbd40a519ed64e7fbfd6867290da
+F test/collate4.test f04d5168685f2eef637ecfa2d4ddf8ec0d600177
F test/collate5.test 65d928034d30d2d263a80f6359f7549ee1598ec6
F test/collate6.test 8be65a182abaac8011a622131486dafb8076e907
F test/collate7.test 8ec29d98f3ee4ccebce6e16ce3863fb6b8c7b868
F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
F test/colmeta.test 087c42997754b8c648819832241daf724f813322
F test/colname.test 08948a4809d22817e0e5de89c7c0a8bd90cb551b
-F test/conflict.test 0b3922d2304a14a47e3ccd61bbd6824327af659b
-F test/conflict2.test 73b8cfed6a04571cc79d36e55c09d79d15187201
+F test/conflict.test 841bcf7cabbfca39c577eb8411ea8601843b46a8
+F test/conflict2.test 5d162ecbbde37f165de1992904dcbbed9fc7c012
F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4
F test/corrupt.test 4aabd06cff3fe759e3e658bcc17b71789710665e
F test/corrupt2.test 9c0ab4becd50e9050bc1ebb8675456a4e5587bf0
F test/diskfull.test 106391384780753ea6896b7b4f005d10e9866b6e
F test/distinct.test 44028aaf161a5e80a2f229622b3a174d3b352810
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_droptrigger.test 3cd080807622c13e5bbb61fc9a57bd7754da2412
F test/e_dropview.test 0c9f7f60989164a70a67a9d9c26d1083bc808306
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_insert.test 291e056e1a442a5e5166a989a8a03a46e38225ca
+F test/e_insert.test 1e44f84d2abe44d66e4fbf198be4b20e3cc724a0
F test/e_reindex.test 396b7b4f0a66863b4e95116a67d93b227193e589
F test/e_resolve.test dcce9308fb13b934ce29591105d031d3e14fbba6
F test/e_select.test d3226cb94fae4af3f198e68e71f655e106d0be47
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_vacuum.test 5bfbdc21b65c0abf24398d0ba31dc88d93ca77a9
F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea
F test/enc3.test 90683ad0e6ea587b9d5542ca93568af9a9858c40
F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
F test/eqp.test 57c6c604c2807fb5531731c5323133453c24afac
-F test/errmsg.test 050717f1c6a5685de9c79f5f9f6b83d7c592f73a
+F test/errmsg.test f31592a594b44ee121371d25ddd5d63497bb3401
F test/eval.test bc269c365ba877554948441e91ad5373f9f91be3
F test/exclusive.test c7ebbc756eacf544c108b15eed64d7d4e5f86b75
F test/exclusive2.test 881193eccec225cfed9d7f744b65e57f26adee25
F test/filectrl.test 14fa712e42c4cb791e09dfd58a6a03efb47ef13a
F test/filefmt.test cb34663f126cbc2d358af552dcaf5c72769b0146
F test/fkey1.test e1d1fa84cde579185ea01358436839703e415a5b
-F test/fkey2.test c9b3a4f1e67546a92b568de59d555eaf5480ed65
-F test/fkey3.test 5ec899d12b13bcf1e9ef40eff7fb692fdb91392e
+F test/fkey2.test 32ca728bcb854feed72d1406ea375fe423eebff2
+F test/fkey3.test 76d475c80b84ee7a5d062e56ccb6ea68882e2b49
F test/fkey4.test 86446017011273aad8f9a99c1a65019e7bd9ca9d
F test/fkey5.test 8a1fde4e7721ae00b05b3178888833726ca2df8d
-F test/fkey6.test 18e8c024d39f68f8d4bb1177c992bcffdc273464
+F test/fkey6.test abb59f866c1b44926fd02d1fdd217d831fe04f48
F test/fkey7.test e31d0e71a41c1d29349a16448d6c420e2c53a8fc
F test/fkey_malloc.test bb74c9cb8f8fceed03b58f8a7ef2df98520bbd51
F test/format4.test 1f0cac8ff3895e9359ed87e41aaabee982a812eb
F test/func.test c7e80a44eebac8604397eb2ad83d0d5d9d541237
F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
F test/func3.test dbccee9133cfef1473c59ec07b5f0262b9d72f9a
-F test/func4.test cb3f888a1cafad195a1f8d396875bdb11dc4faf9
+F test/func4.test 6beacdfcb0e18c358e6c2dcacf1b65d1fa80955f
F test/fuzz-oss1.test 4912e528ec9cf2f42134456933659d371c9e0d74
F test/fuzz.test 77fd50afc12847af50fcf1941679d90adebadde6
F test/fuzz2.test 207d0f9d06db3eaf47a6b7bfc835b8e2fc397167
F test/genesis.tcl 1e2e2e8e5cc4058549a154ff1892fe5c9de19f98
F test/hook.test 45cb22b940c3cc0af616ba7430f666e245711a48
F test/icu.test 70df4faca133254c042d02ae342c0a141f2663f4
-F test/in.test 5941096407d8c133b9eff15bd3e666624b6cbde3
+F test/in.test 047c4671328e9032ab95666a67021adbbd36e98e
F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
F test/in4.test 64f3cc1acde1b9161ccdd8e5bde3daefdb5b2617
F test/in5.test 99f9a40af01711b06d2d614ecfe96129f334fba3
F test/incrblob.test e81846d214f3637622620fbde7cd526781cfe328
-F test/incrblob2.test edc3a96e557bd61fb39acc8d2edd43371fbbaa19
+F test/incrblob2.test bf4d549aa4a466d7fbe3e3a3693d3861263d5600
F test/incrblob3.test d8d036fde015d4a159cd3cbae9d29003b37227a4
F test/incrblob4.test f26502a5697893e5acea268c910f16478c2f0fab
F test/incrblob_err.test d2562d2771ebffd4b3af89ef64c140dd44371597
F test/incrvacuum2.test 379eeb8740b0ef60c372c439ad4cbea20b34bb9b
F test/incrvacuum3.test 75256fb1377e7c39ef2de62bfc42bbff67be295a
F test/incrvacuum_ioerr.test 6ae2f783424e47a0033304808fe27789cf93e635
-F test/index.test f2abacfb83d384ae36b8a919fbd94b1319333e55
+F test/index.test 4d990005a67a36984e4f1a5f1bdccea8d08da4ee
F test/index2.test ee83c6b5e3173a3d7137140d945d9a5d4fdfb9d6
-F test/index3.test 423a25c789fc8cc51aaf2a4370bbdde2d9e9eed7
-F test/index4.test 2983216eb8c86ee62d9ed7cb206b5cc3331c0026
+F test/index3.test 55a90cff99834305e8141df7afaef39674b57062
+F test/index4.test ab92e736d5946840236cd61ac3191f91a7856bf6
F test/index5.test fc07c14193c0430814e7a08b5da46888ee795c33
-F test/index6.test 9996f064672c03e768e256e4bf7cff4b63e8b109
-F test/index7.test d38186768f58937fcb29c11aa03b19caadb0aeae
+F test/index6.test 936979c3a1e87b81feaed2d00505665bf142d764
+F test/index7.test a3baf9a625bda7fd49471e99aeae04095fbfeecf
F test/indexedby.test b2f22f3e693a53813aa3f50b812eb609ba6df1ec
F test/indexfault.test 31d4ab9a7d2f6e9616933eb079722362a883eb1d
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
F test/insert.test 489aa12a027c83d291f5034a83c8c32e6be1dca2
F test/insert2.test 4f3a04d168c728ed5ec2c88842e772606c7ce435
F test/insert3.test 1b7db95a03ad9c5013fdf7d6722b6cd66ee55e30
-F test/insert4.test 87f6798f31d60c4e177622fcc3663367e6ecbd90
+F test/insert4.test b00ddf82d6d4f0a6f3999f42bb6a3c813ea70707
F test/insert5.test 394f96728d1258f406fe5f5aeb0aaf29487c39a6
F test/instr.test 737bbf80685232033f3abedc6ae92f75860b5dd2
F test/intarray.test 066b7d7ac38d25bf96f87f1b017bfc687551cdd4
F test/interrupt.test dfe9a67a94b0b2d8f70545ba1a6cca10780d71cc
-F test/intpkey.test a9674fc6195e0952e4e6105a9981ce1e48e7f215
+F test/intpkey.test 7506090fc08e028712a8bf47e5f54111947e3844
F test/io.test 3a7abcef18727cc0f2399e04b0e8903eccae50f8
F test/ioerr.test 40bb2cfcab63fb6aa7424cd97812a84bc16b5fb8
F test/ioerr2.test 9d71166f8466eda510f1af6137bdabaa82b5408d
F test/malloc_common.tcl 58e54229c4132ef882a11fab6419ec4cd3073589
F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
-F test/memdb.test db5260330676de007be8530d6ecc7c9ab2b06ad3
+F test/memdb.test fcb5297b321b562084fc79d64d5a12a1cd2b639b
F test/memleak.test 10b9c6c57e19fc68c32941495e9ba1c50123f6e2
F test/memsubsys1.test f97cfd0b30e85c2f1ed16d642e7ac58006be84b2
F test/memsubsys2.test 3a1c1a9de48e5726faa85108b02459fae8cb9ee9
F test/minmax2.test b44bae787fc7b227597b01b0ca5575c7cb54d3bc
F test/minmax3.test cc1e8b010136db0d01a6f2a29ba5a9f321034354
F test/minmax4.test 536a3360470633a177e42fbc19660d146b51daef
-F test/misc1.test fc2e45c71d630d87382c8866ef2ca84dc0d57219
+F test/misc1.test 9bed1bd334065a57dc841cff969d4fc1eeb6d49b
F test/misc2.test 00d7de54eda90e237fc9a38b9e5ccc769ebf6d4d
F test/misc3.test cf3dda47d5dda3e53fc5804a100d3c82be736c9d
F test/misc4.test 9c078510fbfff05a9869a0b6d8b86a623ad2c4f6
F test/notify1.test 669b2b743618efdc18ca4b02f45423d5d2304abf
F test/notify2.test ce23eb522c9e1fff6443f96376fe67872202061c
F test/notify3.test 10ff25cde502e72a92053a2f215d64bece4ef934
-F test/notnull.test 2afad748d18fd66d01f66463de73b3e2501fb226
+F test/notnull.test f8fcf58669ddba79274daa2770d61dfad8274f62
F test/null.test a8b09b8ed87852742343b33441a9240022108993
F test/numcast.test 5d126f7f581432e86a90d1e35cac625164aec4a1
F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394
F test/orderby4.test 4d39bfbaaa3ae64d026ca2ff166353d2edca4ba4
F test/orderby5.test 02eca502a0f97c77ce383b0dfa17e99c6a107b8d
F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3
-F test/pager1.test 16b649c8f0b38d446acbcff8a7bf055a9be43276
+F test/pager1.test 1acbdb14c5952a72dd43129cabdbf69aaa3ed1fa
F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f
F test/pagerfault.test 7285379906ab2f1108b8e82bbdf2d386cc8ff3ff
F test/releasetest.mk 2eced2f9ae701fd0a29e714a241760503ccba25a
F test/releasetest.tcl 06d289d8255794073a58d2850742f627924545ce
F test/resolver01.test 33abf37ff8335e6bf98f2b45a0af3e06996ccd9a
-F test/rollback.test a1b4784b864331eae8b2a98c189efa2a8b11ff07
+F test/rollback.test e9504a009a202c3ed711da2e6879ff60c5a4669c
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
F test/rowid.test f777404492adb0e00868fd706a3721328fd3af48
F test/rtree.test 0c8d9dd458d6824e59683c19ab2ffa9ef946f798
-F test/savepoint.test e04f1ca181b706310af944146df39e2bed03cdd5
+F test/savepoint.test 6c53f76dffe5df0dd87646efe3e7aa159c36e07b
F test/savepoint2.test 9b8543940572a2f01a18298c3135ad0c9f4f67d7
F test/savepoint3.test e328085853b14898d78ceea00dfe7db18bb6a9ec
F test/savepoint4.test c8f8159ade6d2acd9128be61e1230f1c1edc6cc0
F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5
F test/schema3.test 1bc1008e1f8cb5654b248c55f27249366eb7ed38
F test/schema4.test e6a66e20cc69f0e306667c08be7fda3d11707dc5
-F test/schema5.test 9ef976783eb3d9a612aacb75690bb45975ffa812
+F test/schema5.test 29699b4421f183c8f0e88bd28ce7d75d13ea653e
F test/securedel.test 87a2561151af1f1e349071a89fdd77059f50113c
F test/securedel2.test 2d54c28e46eb1fd6902089958b20b1b056c6f1c5
F test/select1.test fc2a61f226a649393664ad54bc5376631801517c
F test/sync.test a34cd43e98b7fb84eabbf38f7ed8f7349b3f3d85
F test/syscall.test a653783d985108c4912cc64d341ffbbb55ad2806
F test/sysfault.test fa776e60bf46bdd3ae69f0b73e46ee3977a58ae6
-F test/table.test 30423211108121884588d24d6776c7f38702ad7b
+F test/table.test 580d23530187026d4502fae74a490f0408cf2cc7
F test/tableapi.test 2674633fa95d80da917571ebdd759a14d9819126
F test/tableopts.test 2950f094a984c8aa53493598bf0a07ac7549eb02
F test/tclsqlite.test 37a61c2da7e3bfe3b8c1a2867199f6b860df5d43
F test/tkt-3998683a16.test 6d1d04d551ed1704eb3396ca87bb9ccc8c5c1eb7
F test/tkt-3a77c9714e.test b08bca26de1140bdf004a37716582a43d7bd8be8
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-54844eea3f.test a12b851128f46a695e4e378cca67409b9b8f5894
F test/tkt-5d863f876e.test c9f36ca503fa154a3655f92a69d2c30da1747bfa
F test/tkt-5ee23731f.test 9db6e1d7209dc0794948b260d6f82b2b1de83a9f
F test/tkt-6bfb98dfc0.test 24780633627b5cfc0635a5500c2389ebfb563336
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-7bbfb7d442.test 7b2cd79c7a17ae6750e75ec1a7846712a69c9d18
F test/tkt-80ba201079.test 105a721e6aad0ae3c5946d7615d1e4d03f6145b8
F test/tkt-9d68c883.test 458f7d82a523d7644b54b497c986378a7d8c8b67
F test/tkt-9f2eb3abac.test 85bc63e749f050e6a61c8f9207f1eee65c9d3395
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-b72787b1.test a95e8cdad0b98af1853ac7f0afd4ab27b77bf5f3
F test/tkt-bd484a090c.test 60460bf946f79a79712b71f202eda501ca99b898
F test/tkt1514.test ddef38e34fea72eb1ab935ded9f17a3fb71dd9df
F test/tkt1536.test 83ff7a7b6e248016f8d682d4f7a4ae114070d466
F test/tkt1537.test e3a14332de9770be8ff14bd15c19a49cbec10808
-F test/tkt1567.test 80e7144f828b4959bc50b0bba47bf3eb87dbba10
+F test/tkt1567.test 52f329386ac77e59260d4af1c58490d61377db20
F test/tkt1644.test 80b6a2bb17885f3cf1cb886d97cdad13232bb869
F test/tkt1667.test 4700d931ed19ea3983e8e703becb28079250b460
F test/tkt1873.test 0e1b8c023050a430c2525179ed4022ddc7c31264
F test/tkt3541.test 5dc257bde9bc833ab9cc6844bf170b998dbb950a
F test/tkt3554.test f599967f279077bace39220cbe76085c7b423725
F test/tkt3581.test 1966b7193f1e3f14951cce8c66907ae69454e9a3
-F test/tkt35xx.test 69d038ce5898f1b64f2084b780bbab1cf9be0a25
+F test/tkt35xx.test f38c1b03713179d414969187c941466e44945b35
F test/tkt3630.test 929f64852103054125200bc825c316d5f75d42f7
F test/tkt3718.test 3b59dcb5c4e7754dacd91e7fd353a61492cc402a
F test/tkt3731.test 0c5f4cbffe102d43c3b2188af91a9e36348f974b
F test/trans3.test 373ac5183cc56be69f48ae44090e7f672939f732
F test/transitive1.test 03f532954f46cdf5608f7766bff0b0c52bf2a7cd
F test/trigger1.test dc47573ac79ffe0ee3eecaa517d70d8dacbccd03
-F test/trigger2.test 1996d775f4370044b8414505477f632e1fa24376
+F test/trigger2.test 5cd7d69a7ba1143ee045e4ae2963ff32ae4c87a6
F test/trigger3.test aa640bb2bbb03edd5ff69c055117ea088f121945
F test/trigger4.test 74700b76ebf3947b2f7a92405141eb2cf2a5d359
F test/trigger5.test 619391a3e9fc194081d22cefd830d811e7badf83
F test/trigger9.test 5b0789f1c5c4600961f8e68511b825b87be53e31
F test/triggerA.test fe5597f47ee21bacb4936dc827994ed94161e332
F test/triggerB.test 56780c031b454abac2340dbb3b71ac5c56c3d7fe
-F test/triggerC.test a7b4367392c755bc5fd5fff88011753e6b6afe90
+F test/triggerC.test a68980c5955d62ee24be6f97129d824f199f9a4c
F test/triggerD.test 8e7f3921a92a5797d472732108109e44575fa650
F test/triggerE.test 355e9c5cbaed5cd039a60baad1fb2197caeb8e52
F test/tt3_checkpoint.c 415eccce672d681b297485fc20f44cdf0eac93af
F test/types.test bf816ce73c7dfcfe26b700c19f97ef4050d194ff
F test/types2.test 3555aacf8ed8dc883356e59efc314707e6247a84
F test/types3.test 99e009491a54f4dc02c06bdbc0c5eea56ae3e25a
-F test/unique.test 196505faa97f12ca76c1a67f526fc8daf1a74c31
+F test/unique.test 93f8b2ef5ea51b9495f8d6493429b1fd0f465264
F test/unixexcl.test a9870e46cc6f8390a494513d4f2bf55b5a8b3e46
F test/unordered.test ef85ac8f2f3c93ed2b9e811b684de73175fc464c
-F test/update.test 8bc86fd7ef1a00014f76dc6a6a7c974df4aef172
+F test/update.test 1b6c488a8f993d090b7ee9ad0e234faa161b3aeb
F test/uri.test 63e03df051620a18f794b4f4adcdefb3c23b6751
F test/utf16align.test 54cd35a27c005a9b6e7815d887718780b6a462ae
F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
F test/veryquick.test 57ab846bacf7b90cf4e9a672721ea5c5b669b661
F test/view.test 4057630287bfa5955628fe90a13d4c225d1c7352
-F test/vtab1.test 1550abf90bc2b996f8c34e0be3fdb251af54fa41
+F test/vtab1.test 45ddde57764659c0ec90874bcb6c4831f1004c06
F test/vtab2.test 7bcffc050da5c68f4f312e49e443063e2d391c0d
F test/vtab3.test baad99fd27217f5d6db10660522e0b7192446de1
F test/vtab4.test 942f8b8280b3ea8a41dae20e7822d065ca1cb275
F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
F test/vtab_shared.test 82f463886e18d7f8395a4b6167c91815efe54839
-F test/wal.test 3a6ebdf0287b38b5537c07c517b30dda9aaac317
+F test/wal.test a59d00eaa0901e42b8a2ef21f2a4c972ee1f1bd4
F test/wal2.test d4b470f13c87f6d8268b004380afa04c3c67cb90
F test/wal3.test b22eb662bcbc148c5f6d956eaf94b047f7afe9c0
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
F test/wild001.test bca33f499866f04c24510d74baf1e578d4e44b1c
F test/win32lock.test 7a6bd73a5dcdee39b5bb93e92395e1773a194361
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_rowid3.test fb9835ccccf50a9d45295206a9c3f6baaf114d55
-F test/without_rowid4.test 27594b4b47880042532afba0153dda7dc64cef9c
+F test/without_rowid3.test eac3d5c8a1924725b58503a368f2cbd24fd6c8a0
+F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a
F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688
F test/zerodamage.test 209d7ed441f44cc5299e4ebffbef06fd5aabfefd
F tool/build-all-msvc.bat 1bac6adc3fdb4d9204f21d17b14be25778370e48 x
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 79befe3ac1f676272b78423b9aa5dac41435420e
-R 766c023e71cd0186fc0f56e56f90b7bf
+P 294ed33756b06375e56c41f1088d42ee48adbdc8
+R 130b6461e81d8eeec1daafa19f71d1d2
U drh
-Z e7978228c6b42136e19f0b3015aa0577
+Z ecfd4293f10f89cf27ac30e16c93be55
-294ed33756b06375e56c41f1088d42ee48adbdc8
\ No newline at end of file
+54b221929744b1bcdbcc2030fef2e510618afd41
\ No newline at end of file
addr2 = sqlite3VdbeCurrentAddr(v);
sqlite3VdbeAddOp4Int(v, OP_SorterCompare, iSorter, j2, regRecord,
pKey->nField - pIndex->nKeyCol);
- sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_UNIQUE,
- OE_Abort, "indexed columns are not unique", P4_STATIC
- );
+ sqlite3UniqueConstraint(pParse, OE_Abort, pIndex);
}else{
addr2 = sqlite3VdbeCurrentAddr(v);
}
int errCode, /* extended error code */
int onError, /* Constraint type */
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);
assert( (errCode&0xff)==SQLITE_CONSTRAINT );
sqlite3MayAbort(pParse);
}
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);
}
/*
v, OP_Halt, SQLITE_OK, OE_Ignore, 0, pExpr->u.zToken,0);
}else{
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_TRIGGER,
- pExpr->affinity, pExpr->u.zToken, 0);
+ pExpr->affinity, pExpr->u.zToken, 0, 0);
}
break;
** generated for will not open a statement transaction. */
assert( nIncr==1 );
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,
- OE_Abort, "foreign key constraint failed", P4_STATIC
- );
+ OE_Abort, 0, P4_STATIC, P5_ConstraintFK);
}else{
if( nIncr>0 && pFKey->isDeferred==0 ){
sqlite3ParseToplevel(pParse)->mayAbort = 1;
** --------------------------------------------------------------------------
** DELETE immediate Increment the "immediate constraint counter".
** 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".
**
** DELETE deferred Increment the "deferred constraint counter".
** 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".
**
if( (db->flags & SQLITE_DeferFKs)==0 ){
sqlite3VdbeAddOp2(v, OP_FkIfZero, 0, sqlite3VdbeCurrentAddr(v)+2);
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,
- OE_Abort, "foreign key constraint failed", P4_STATIC
- );
+ OE_Abort, 0, P4_STATIC, P5_ConstraintFK);
}
if( iSkip ){
tFrom.z = zFrom;
tFrom.n = nFrom;
- pRaise = sqlite3Expr(db, TK_RAISE, "foreign key constraint failed");
+ pRaise = sqlite3Expr(db, TK_RAISE, "FOREIGN KEY constraint failed");
if( pRaise ){
pRaise->affinity = OE_Abort;
}
/* Fall through */
case OE_Rollback:
case OE_Fail: {
- char *zMsg;
- sqlite3VdbeAddOp3(v, OP_HaltIfNull,
- SQLITE_CONSTRAINT_NOTNULL, onError, regNewData+1+i);
- zMsg = sqlite3MPrintf(db, "%s.%s may not be NULL",
- pTab->zName, pTab->aCol[i].zName);
- sqlite3VdbeChangeP4(v, -1, zMsg, P4_DYNAMIC);
+ char *zMsg = sqlite3MPrintf(db, "%s.%s", pTab->zName,
+ pTab->aCol[i].zName);
+ sqlite3VdbeAddOp4(v, OP_HaltIfNull, SQLITE_CONSTRAINT_NOTNULL, onError,
+ regNewData+1+i, zMsg, P4_DYNAMIC);
+ sqlite3VdbeChangeP5(v, P5_ConstraintNotNull);
break;
}
case OE_Ignore: {
if( onError==OE_Ignore ){
sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
}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( zConsName ){
- zConsName = sqlite3MPrintf(db, "constraint %s failed", zConsName);
- }else{
- zConsName = 0;
- }
sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_CHECK,
- onError, zConsName, P4_DYNAMIC);
+ onError, zName, P4_TRANSIENT,
+ P5_ConstraintCheck);
}
sqlite3VdbeResolveLabel(v, allOk);
}
case OE_Rollback:
case OE_Abort:
case OE_Fail: {
- sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_PRIMARYKEY,
- onError, "PRIMARY KEY must be unique", P4_STATIC);
+ sqlite3RowidConstraint(pParse, onError, pTab);
break;
}
case OE_Replace: {
case OE_Rollback:
case OE_Abort:
case OE_Fail: {
- if( pIdx->autoIndex==2 ){
- 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);
- }
+ sqlite3UniqueConstraint(pParse, onError, pIdx);
break;
}
case OE_Ignore: {
if( pDest->iPKey>=0 ){
addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);
- sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_PRIMARYKEY,
- onError, "PRIMARY KEY must be unique", P4_STATIC);
+ sqlite3RowidConstraint(pParse, onError, pDest);
sqlite3VdbeJumpHere(v, addr2);
autoIncStep(pParse, regAutoinc, regRowid);
}else if( pDest->pIndex==0 ){
case SQLITE_CONSTRAINT_VTAB: zName = "SQLITE_CONSTRAINT_VTAB"; break;
case SQLITE_CONSTRAINT_FUNCTION:
zName = "SQLITE_CONSTRAINT_FUNCTION"; break;
+ case SQLITE_CONSTRAINT_ROWID: zName = "SQLITE_CONSTRAINT_ROWID"; break;
case SQLITE_MISMATCH: zName = "SQLITE_MISMATCH"; break;
case SQLITE_MISUSE: zName = "SQLITE_MISUSE"; break;
case SQLITE_NOLFS: zName = "SQLITE_NOLFS"; break;
#define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8))
#define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<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_ROLLBACK (SQLITE_NOTICE | (2<<8))
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
void sqlite3BeginWriteOperation(Parse*, int, int);
void sqlite3MultiWrite(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);
ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);
SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);
break;
}
-/* Opcode: HaltIfNull P1 P2 P3 P4 *
+/* Opcode: HaltIfNull P1 P2 P3 P4 P5
** Synopsis: if r[P3] null then halt
**
** 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
** value in register P3 is not NULL, then this routine is a no-op.
+** The P5 parameter should be 1.
*/
case OP_HaltIfNull: { /* in3 */
pIn3 = &aMem[pOp->p3];
/* Fall through into OP_Halt */
}
-/* Opcode: Halt P1 P2 * P4 *
+/* Opcode: Halt P1 P2 * P4 P5
**
** Exit immediately. All open cursors, etc are closed
** automatically.
**
** 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
** every program. So a jump past the last instruction of the program
** is the same as executing Halt.
*/
case OP_Halt: {
+ const char *zType;
+ const char *zLogFmt;
+
if( pOp->p1==SQLITE_OK && p->pFrame ){
/* Halt the sub-program. Return control to the parent frame. */
VdbeFrame *pFrame = p->pFrame;
aMem = p->aMem;
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->errorAction = (u8)pOp->p2;
p->pc = pc;
- if( pOp->p4.z ){
- assert( p->rc!=SQLITE_OK );
- sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z);
- testcase( sqlite3GlobalConfig.xLog!=0 );
- sqlite3_log(pOp->p1, "abort at %d in [%s]: %s", pc, p->zSql, pOp->p4.z);
- }else if( p->rc ){
- testcase( sqlite3GlobalConfig.xLog!=0 );
- sqlite3_log(pOp->p1, "constraint failed at %d in [%s]", pc, p->zSql);
+ if( p->rc ){
+ zLogFmt = "abort at %d in [%s]: %s";
+ if( zType && pOp->p4.z ){
+ sqlite3SetString(&p->zErrMsg, db, "%s constraint failed: %s",
+ zType, pOp->p4.z);
+ }else if( pOp->p4.z ){
+ sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z);
+ }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);
assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR );
#define P4_KEYINFO_HANDOFF (-16)
#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
** number of columns of data returned by the statement.
){
p->rc = SQLITE_CONSTRAINT_FOREIGNKEY;
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_OK;
catchsql {
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 {
execsql {
SELECT sum(a) FROM av1;
do_test capi2-3.14 {
list [sqlite3_finalize $VM] [sqlite3_errmsg $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 {
set VM [sqlite3_prepare $DB {CREATE TABLE t2(a NOT NULL, b)} -1 TAIL]
set TAIL
do_test capi2-3.19 {
list [sqlite3_finalize $VM] [sqlite3_errmsg $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 {
execsql {
INSERT INTO t1 VALUES(2,4,5);
SELECT * FROM t1;
}
-} {1 {column a is not unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test capi2-6.28 {
list [sqlite3_step $VM1] \
[sqlite3_column_count $VM1] \
catchsql {
INSERT INTO t1 VALUES(6,7);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
do_test check-1.4 {
execsql {
SELECT * FROM t1;
catchsql {
INSERT INTO t1 VALUES(4,3);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
do_test check-1.6 {
execsql {
SELECT * FROM t1;
catchsql {
UPDATE t1 SET x=7 WHERE x==2
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
do_test check-1.13 {
execsql {
SELECT * FROM t1;
catchsql {
UPDATE t1 SET x=5 WHERE x==2
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
do_test check-1.15 {
execsql {
SELECT * FROM t1;
catchsql {
INSERT INTO t2 VALUES(1.1, NULL, NULL);
}
-} {1 {constraint one failed}}
+} {1 {CHECK constraint failed: one}}
do_test check-2.5 {
catchsql {
INSERT INTO t2 VALUES(NULL, 5, NULL);
}
-} {1 {constraint two failed}}
+} {1 {CHECK constraint failed: two}}
do_test check-2.6 {
catchsql {
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.
# Such a clause is ignored. But the parser must accept it for backwards
catchsql {
INSERT INTO t2b VALUES('xyzzy','hi',5);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t2b}}
do_test check-2.12 {
execsql {
CREATE TABLE t2c(
catchsql {
INSERT INTO t2c VALUES('xyzzy',7,8);
}
-} {1 {constraint x_two failed}}
+} {1 {CHECK constraint failed: x_two}}
do_test check-2.cleanup {
execsql {
DROP TABLE IF EXISTS t2b;
catchsql {
INSERT INTO t3 VALUES(111,222,333);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t3}}
do_test check-4.1 {
execsql {
catchsql {
UPDATE t4 SET x=0, y=1;
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t4}}
do_test check-4.7 {
execsql {
SELECT * FROM t4;
PRAGMA ignore_check_constraints=OFF;
UPDATE t4 SET x=0, y=2;
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t4}}
ifcapable vacuum {
do_test check_4.10 {
catchsql {
catchsql {
UPDATE OR FAIL t1 SET x=7-x, y=y+1;
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
do_test check-6.6 {
execsql {
SELECT * FROM t1;
INSERT INTO t1 VALUES(1,30.0);
INSERT OR ROLLBACK INTO t1 VALUES(8,40.0);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
do_test check-6.8 {
catchsql {
COMMIT;
catchsql {
REPLACE INTO t1 VALUES(6,7);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
do_test check-6.13 {
execsql {SELECT * FROM t1}
} {3 12.0 2 20.0}
do_execsql_test 7.1 { CREATE TABLE t6(a CHECK (myfunc(a))) }
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 {
sqlite3 db2 test.db
do_test 7.8 {
db2 func myfunc myfunc
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.
#
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 {
execsql {
SELECT * FROM collate4t1;
catchsql {
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 {
catchsql {
INSERT INTO collate4t1 VALUES(1);
UPDATE collate4t1 SET a = 'abc';
}
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: collate4t1.a}}
do_test collate4-3.5 {
execsql {
DROP TABLE collate4t1;
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 {
execsql {
SELECT * FROM collate4t1;
catchsql {
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 {
catchsql {
INSERT INTO collate4t1 VALUES(1);
UPDATE collate4t1 SET a = 'abc';
}
-} {1 {column a is not unique}}
+} {1 {UNIQUE constraint failed: collate4t1.a}}
do_test collate4-3.10 {
execsql {
DROP TABLE collate4t1;
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 {
execsql {
SELECT * FROM collate4t1;
catchsql {
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 {
catchsql {
INSERT INTO collate4t1 VALUES(1);
UPDATE collate4t1 SET a = 'abc';
}
-} {1 {column a is not unique}}
+} {1 {UNIQUE constraint failed: collate4t1.a}}
do_test collate4-3.15 {
execsql {
15 {} {INSERT OR ABORT} 1 {} 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 {
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
set r0 [catch {execsql [subst {
15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 1
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} {
set t3 0
} else {
INSERT INTO t2 VALUES(3,1,3,3,3);
SELECT * FROM t2;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t2.b}}
do_test conflict-9.6 {
catchsql {
UPDATE t2 SET b=b+1 WHERE b=1;
SELECT * FROM t2;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t2.b}}
do_test conflict-9.7 {
catchsql {
BEGIN;
INSERT INTO t2 VALUES(3,1,3,3,3);
SELECT * FROM t2;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t2.b}}
do_test conflict-9.8 {
execsql {COMMIT}
execsql {SELECT * FROM t3}
UPDATE t2 SET b=b+1 WHERE b=1;
SELECT * FROM t2;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t2.b}}
do_test conflict-9.10 {
execsql {COMMIT}
execsql {SELECT * FROM t3}
INSERT INTO t2 VALUES(3,3,3,1,3);
SELECT * FROM t2;
}
-} {1 {column d is not unique}}
+} {1 {UNIQUE constraint failed: t2.d}}
do_test conflict-9.12 {
catchsql {
UPDATE t2 SET d=d+1 WHERE d=1;
SELECT * FROM t2;
}
-} {1 {column d is not unique}}
+} {1 {UNIQUE constraint failed: t2.d}}
do_test conflict-9.13 {
catchsql {
BEGIN;
INSERT INTO t2 VALUES(3,3,3,1,3);
SELECT * FROM t2;
}
-} {1 {column d is not unique}}
+} {1 {UNIQUE constraint failed: t2.d}}
do_test conflict-9.14 {
execsql {COMMIT}
execsql {SELECT * FROM t3}
UPDATE t2 SET d=d+1 WHERE d=1;
SELECT * FROM t2;
}
-} {1 {column d is not unique}}
+} {1 {UNIQUE constraint failed: t2.d}}
do_test conflict-9.16 {
execsql {COMMIT}
execsql {SELECT * FROM t3}
INSERT INTO t2 VALUES(3,3,3,3,1);
SELECT * FROM t2;
}
-} {1 {column e is not unique}}
+} {1 {UNIQUE constraint failed: t2.e}}
do_test conflict-9.18 {
catchsql {
UPDATE t2 SET e=e+1 WHERE e=1;
SELECT * FROM t2;
}
-} {1 {column e is not unique}}
+} {1 {UNIQUE constraint failed: t2.e}}
do_test conflict-9.19 {
catchsql {
BEGIN;
INSERT INTO t2 VALUES(3,3,3,3,1);
SELECT * FROM t2;
}
-} {1 {column e is not unique}}
+} {1 {UNIQUE constraint failed: t2.e}}
verify_ex_errcode conflict-9.21b SQLITE_CONSTRAINT_UNIQUE
do_test conflict-9.20 {
catch {execsql {COMMIT}}
UPDATE t2 SET e=e+1 WHERE e=1;
SELECT * FROM t2;
}
-} {1 {column e is not unique}}
+} {1 {UNIQUE constraint failed: t2.e}}
verify_ex_errcode conflict-9.21b SQLITE_CONSTRAINT_UNIQUE
do_test conflict-9.22 {
catch {execsql {COMMIT}}
catchsql {
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
do_test conflict-12.4 {
execsql {
SELECT * FROM t5;
}
} {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]
catchsql {
REPLACE INTO t13 VALUES(2);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t13}}
verify_ex_errcode conflict-13.1b SQLITE_CONSTRAINT_CHECK
do_test conflict-13.2 {
execsql {
15 {} {INSERT OR ABORT} 1 {} 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 {
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
set r0 [catch {execsql [subst {
15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 1
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} {
set t3 0
} else {
catchsql {
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 {
db eval {SELECT * FROM t2;}
} {1 1 1 1 1 2 2 2 2 2}
UPDATE t2 SET b=b+1 WHERE b=1;
SELECT * FROM t2;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t2.b}}
do_test conflict2-9.6b {
db eval {SELECT * FROM t2;}
} {1 1 1 1 1 2 2 2 2 2}
INSERT INTO t2 VALUES(3,1,3,3,3);
SELECT * FROM t2;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t2.b}}
do_test conflict2-9.8 {
execsql {COMMIT}
execsql {SELECT * FROM t3}
UPDATE t2 SET b=b+1 WHERE b=1;
SELECT * FROM t2;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t2.b}}
do_test conflict2-9.10 {
execsql {COMMIT}
execsql {SELECT * FROM t3}
INSERT INTO t2 VALUES(3,3,3,1,3);
SELECT * FROM t2;
}
-} {1 {column d is not unique}}
+} {1 {UNIQUE constraint failed: t2.d}}
do_test conflict2-9.12 {
catchsql {
UPDATE t2 SET d=d+1 WHERE d=1;
SELECT * FROM t2;
}
-} {1 {column d is not unique}}
+} {1 {UNIQUE constraint failed: t2.d}}
do_test conflict2-9.13 {
catchsql {
BEGIN;
INSERT INTO t2 VALUES(3,3,3,1,3);
SELECT * FROM t2;
}
-} {1 {column d is not unique}}
+} {1 {UNIQUE constraint failed: t2.d}}
do_test conflict2-9.14 {
execsql {COMMIT}
execsql {SELECT * FROM t3}
UPDATE t2 SET d=d+1 WHERE d=1;
SELECT * FROM t2;
}
-} {1 {column d is not unique}}
+} {1 {UNIQUE constraint failed: t2.d}}
do_test conflict2-9.16 {
execsql {COMMIT}
execsql {SELECT * FROM t3}
INSERT INTO t2 VALUES(3,3,3,3,1);
SELECT * FROM t2;
}
-} {1 {column e is not unique}}
+} {1 {UNIQUE constraint failed: t2.e}}
do_test conflict2-9.18 {
catchsql {
UPDATE t2 SET e=e+1 WHERE e=1;
SELECT * FROM t2;
}
-} {1 {column e is not unique}}
+} {1 {UNIQUE constraint failed: t2.e}}
do_test conflict2-9.19 {
catchsql {
BEGIN;
INSERT INTO t2 VALUES(3,3,3,3,1);
SELECT * FROM t2;
}
-} {1 {column e is not unique}}
+} {1 {UNIQUE constraint failed: t2.e}}
verify_ex_errcode conflict2-9.21b SQLITE_CONSTRAINT_UNIQUE
do_test conflict2-9.20 {
catch {execsql {COMMIT}}
UPDATE t2 SET e=e+1 WHERE e=1;
SELECT * FROM t2;
}
-} {1 {column e is not unique}}
+} {1 {UNIQUE constraint failed: t2.e}}
verify_ex_errcode conflict2-9.21b SQLITE_CONSTRAINT_UNIQUE
do_test conflict2-9.22 {
catch {execsql {COMMIT}}
catchsql {
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
do_test conflict2-12.4 {
execsql {
catchsql {
REPLACE INTO t13 VALUES(2);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t13}}
verify_ex_errcode conflict2-13.1b SQLITE_CONSTRAINT_CHECK
do_test conflict2-13.2 {
execsql {
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"}
2 "INSERT INTO t1 VALUES(45.5, '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"}
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"}
7 "INSERT INTO t2 VALUES(45.5, 'one')" {"columns x, y are"}
8 "INSERT INTO t2 VALUES(0.0, 'zero')" {"columns x, y are"}
9 "INSERT INTO t2 VALUES('brambles', '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"}
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"}
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"}
-
+}
+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"}
7 "UPDATE t2 SET x='brambles', y='two' WHERE y='three'"
{"columns x, y are"}
INSERT INTO t4 VALUES('xyx', 2, 1);
INSERT INTO t4 VALUES('uvw', 1, 1);
}
-do_createtable_tests 4.7.1 -error { %s not unique } {
- 1 "INSERT INTO t1 VALUES(1, 'one')" {{column a is}}
- 2 "INSERT INTO t1 VALUES(4.3, 'two')" {{column a is}}
- 3 "INSERT INTO t1 VALUES('reveal', 'three')" {{column a is}}
- 4 "INSERT INTO t1 VALUES(X'123456', 'four')" {{column a is}}
+do_createtable_tests 4.7.1 -error {UNIQUE constraint failed: %s} {
+ 1 "INSERT INTO t1 VALUES(1, 'one')" {{t1.a}}
+ 2 "INSERT INTO t1 VALUES(4.3, 'two')" {{t1.a}}
+ 3 "INSERT INTO t1 VALUES('reveal', 'three')" {{t1.a}}
+ 4 "INSERT INTO t1 VALUES(X'123456', 'four')" {{t1.a}}
- 5 "UPDATE t1 SET a = 1 WHERE rowid=2" {{column a is}}
- 6 "UPDATE t1 SET a = 4.3 WHERE rowid=3" {{column a is}}
- 7 "UPDATE t1 SET a = 'reveal' WHERE rowid=4" {{column a is}}
- 8 "UPDATE t1 SET a = X'123456' WHERE rowid=1" {{column a is}}
+ 5 "UPDATE t1 SET a = 1 WHERE rowid=2" {{t1.a}}
+ 6 "UPDATE t1 SET a = 4.3 WHERE rowid=3" {{t1.a}}
+ 7 "UPDATE t1 SET a = 'reveal' WHERE rowid=4" {{t1.a}}
+ 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}}
- 10 "INSERT INTO t4 VALUES('xyx', 2, 1)" {{columns a, b, c are}}
- 11 "INSERT INTO t4 VALUES('uvw', 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)" {{t4.a, t4.b, t4.c}}
+ 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}}
- 13 "UPDATE t4 SET b=1 WHERE rowid=2" {{columns a, b, c are}}
- 14 "UPDATE t4 SET a=0, b=0, c=0" {{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" {{t4.a, t4.b, t4.c}}
+ 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
INSERT INTO t2 SELECT * FROM x2;
}
-do_createtable_tests 4.11 -error {constraint failed} {
- 1a "INSERT INTO x1 VALUES('one', 0)" {}
- 1b "INSERT INTO t1 VALUES('one', -4.0)" {}
+do_createtable_tests 4.11 -error {CHECK constraint failed: %s} {
+ 1a "INSERT INTO x1 VALUES('one', 0)" {x1}
+ 1b "INSERT INTO t1 VALUES('one', -4.0)" {t1}
- 2a "INSERT INTO x2 VALUES('abc', 1)" {}
- 2b "INSERT INTO t2 VALUES('abc', 1)" {}
+ 2a "INSERT INTO x2 VALUES('abc', 1)" {x2}
+ 2b "INSERT INTO t2 VALUES('abc', 1)" {t2}
- 3a "INSERT INTO x2 VALUES(0, 'abc')" {}
- 3b "INSERT INTO t2 VALUES(0, 'abc')" {}
+ 3a "INSERT INTO x2 VALUES(0, 'abc')" {x2}
+ 3b "INSERT INTO t2 VALUES(0, 'abc')" {t2}
- 4a "UPDATE t1 SET b=-1 WHERE rowid=1" {}
- 4b "UPDATE x1 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" {x1}
- 4a "UPDATE x2 SET a='' WHERE rowid=1" {}
- 4b "UPDATE t2 SET a='' WHERE rowid=1" {}
+ 4a "UPDATE x2 SET a='' WHERE rowid=1" {x2}
+ 4b "UPDATE t2 SET a='' WHERE rowid=1" {t2}
}
# EVIDENCE-OF: R-34109-39108 If the CHECK expression evaluates to NULL,
INSERT INTO t3 VALUES('x', 'y', 'z');
INSERT INTO t3 VALUES(1, 2, 3);
}
-do_createtable_tests 4.14 -error {
- %s may not be NULL
-} {
+do_createtable_tests 4.14 -error {NOT NULL constraint failed: %s} {
1 "INSERT INTO t1 VALUES(NULL, 'a')" {t1.a}
2 "INSERT INTO t2 VALUES(NULL, 'b')" {t2.a}
3 "INSERT INTO t3 VALUES('c', 'd', NULL)" {t3.c}
}
foreach {tn tbl res ac data} {
- 1 t1_ab {1 {PRIMARY KEY must be unique}} 0 {1 one 2 two 3 three}
- 2 t1_ro {1 {PRIMARY KEY must be unique}} 1 {1 one 2 two}
- 3 t1_fa {1 {PRIMARY KEY must be unique}} 0 {1 one 2 two 3 three 4 string}
+ 1 t1_ab {1 {UNIQUE constraint failed: t1_ab.a}} 0 {1 one 2 two 3 three}
+ 2 t1_ro {1 {UNIQUE constraint failed: t1_ro.a}} 1 {1 one 2 two}
+ 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}
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
do_execsql_test 4.15.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
do_execsql_test 4.15.$tn.4 "SELECT * FROM $tbl" $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}
- 2 t2_ro {1 {t2_ro.b may not be NULL}} 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}
+ 1 t2_ab {1 {NOT NULL constraint failed: t2_ab.b}} 0 {1 one 2 two 3 three}
+ 2 t2_ro {1 {NOT NULL constraint failed: t2_ro.b}} 1 {1 one 2 two}
+ 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}
- 5 t2_re {1 {t2_re.b may not be NULL}} 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}
+ 5 t2_re {1 {NOT NULL constraint failed: t2_re.b}} 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
do_execsql_test 4.16.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
do_execsql_test 4.16.$tn.4 "SELECT * FROM $tbl" $data
}
foreach {tn tbl res ac data} {
- 1 t3_ab {1 {columns a, b are not unique}} 0 {1 one 2 two 3 three}
- 2 t3_ro {1 {columns a, b are not unique}} 1 {1 one 2 two}
- 3 t3_fa {1 {columns a, b are not unique}} 0 {1 one 2 two 3 three 4 three}
+ 1 t3_ab {1 {UNIQUE constraint failed: t3_ab.a, t3_ab.b}}
+ 0 {1 one 2 two 3 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}
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
do_execsql_test 4.17.$tn.1 "BEGIN; INSERT INTO $tbl VALUES(3, 'three')"
do_execsql_test 4.18.2 { BEGIN; INSERT INTO t4 VALUES(5, 6) }
do_catchsql_test 4.18.3 {
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_execsql_test 4.18.5 { SELECT * FROM t4 } {1 2 3 4 5 6}
do_catchsql_test 4.19.1 { INSERT INTO t5 VALUES(NULL, 'not null') } {0 {}}
do_execsql_test 4.19.2 { SELECT * FROM t5 } {}
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_catchsql_test 5.4.4.1 {
INSERT INTO t6 VALUES(2)
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t6.pk}}
do_catchsql_test 5.4.4.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 {
INSERT INTO t8 VALUES(2)
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t8.pk}}
do_catchsql_test 5.4.4.4 {
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
# cause the column "x" to be an alias for the rowid (an integer primary
catchsql {
DELETE FROM t1
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-6.2 {
execsql { PRAGMA foreign_keys }
} {1}
#
do_test e_fkey-8.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 {
execsql { INSERT INTO artist VALUES(2, 'artist 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 {
execsql { INSERT INTO track VALUES(1, 'track 1', 2) }
} {}
#
do_test e_fkey-9.1 {
catchsql { DELETE FROM artist WHERE artistid = 2 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-9.2 {
execsql {
DELETE FROM track WHERE trackartist = 2;
do_test e_fkey-10.3 {
# Setting the trackid to a non-NULL value fails, of course.
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 {
execsql {
INSERT INTO artist VALUES(5, 'artist 5');
UPDATE track SET trackartist = 5 WHERE trackid = 1;
}
catchsql { DELETE FROM artist WHERE artistid = 5}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-10.5 {
execsql {
UPDATE track SET trackartist = NULL WHERE trackid = 1;
set res [catchsql $sql]
set results {
{0 {}}
- {1 {PRIMARY KEY must be unique}}
- {1 {foreign key constraint failed}}
+ {1 {UNIQUE constraint failed: artist.artistid}}
+ {1 {FOREIGN KEY constraint failed}}
}
if {[lsearch $results $res]<0} {
error $res
} {}
do_test e_fkey-12.2 {
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
} {}
do_test e_fkey-13.2 {
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 {
execsql { INSERT INTO track VALUES(14, 'Mr. Bojangles', NULL) }
} {}
catchsql {
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 {
execsql {
INSERT INTO artist VALUES(3, 'Sammy Davis Jr.');
catchsql {
DELETE FROM artist WHERE artistname = 'Frank Sinatra';
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-14.2 {
execsql {
DELETE FROM track WHERE trackname = 'My Way';
catchsql {
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 {
execsql {
DELETE FROM track WHERE trackname IN('That''s Amore', 'Christmas Blues');
proc test_efkey_45 {tn isError sql} {
do_test e_fkey-15.$tn.1 "
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 {
execsql {
} {}
do_test e_fkey-16.3 {
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 {
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
} {integer integer text}
do_test e_fkey-17.4 {
catchsql { DELETE FROM t1 WHERE rowid = 2 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
###########################################################################
### SECTION 3: Required and Suggested Database Indexes
proc test_efkey_60 {tn isError sql} {
do_test e_fkey-23.$tn "
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)"
proc test_efkey_61 {tn isError sql} {
do_test e_fkey-24.$tn "
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] {
test_efkey_61 $tn.1 1 "INSERT INTO $c VALUES(1, 2)"
concat \
[execsql { SELECT rowid FROM track WHERE trackartist = 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 {
concat \
concat \
[execsql { SELECT rowid FROM track WHERE trackartist = 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:
catchsql {
INSERT INTO song VALUES(2, 'Elvis Presley', 'Elvis Is Back!', 'Fever');
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
#-------------------------------------------------------------------------
do_test e_fkey-31.2 {
# Execute a statement that violates the immediate FK constraint.
catchsql { INSERT INTO prince VALUES(1, 2) }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-31.3 {
# This time, use a trigger to fix the constraint violation before the
DROP TRIGGER kt;
}
catchsql { INSERT INTO prince VALUES(3, 4) }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-31.5 {
execsql {
COMMIT;
proc test_efkey_34 {tn isError sql} {
do_test e_fkey-32.$tn "
catchsql {$sql}
- " [lindex {{0 {}} {1 {foreign key constraint failed}}} $isError]
+ " [lindex {{0 {}} {1 {FOREIGN KEY constraint failed}}} $isError]
}
drop_all_tables
proc test_efkey_35 {tn isError sql} {
do_test e_fkey-33.$tn "
catchsql {$sql}
- " [lindex {{0 {}} {1 {foreign key constraint failed}}} $isError]
+ " [lindex {{0 {}} {1 {FOREIGN KEY constraint failed}}} $isError]
}
do_test e_fkey-33.1 {
execsql {
proc test_efkey_29 {tn sql isError} {
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
INSERT INTO track VALUES(1, 'White Christmas', 5);
}
catchsql COMMIT
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-35.3 {
execsql {
INSERT INTO artist VALUES(5, 'Bing Crosby');
} {}
do_test e_fkey-36.3 {
catchsql COMMIT
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-36.4 {
execsql {
UPDATE t1 SET a = 5 WHERE a = 4;
} {}
do_test e_fkey-37.2 {
catchsql {RELEASE one}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-37.3 {
execsql {
UPDATE t1 SET a = 7 WHERE a = 6;
} {}
do_test e_fkey-37.5 {
catchsql {RELEASE one}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-37.6 {
execsql {ROLLBACK TO one ; RELEASE one}
} {}
} {1 1 2 2 3 3 4 4 5 6}
do_test e_fkey-38.3 {
catchsql COMMIT
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-38.4 {
execsql {
ROLLBACK TO one;
} {}
do_test e_fkey-38.6 {
catchsql {RELEASE a}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-38.7 {
execsql {ROLLBACK TO c}
catchsql {RELEASE a}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-38.8 {
execsql {
ROLLBACK TO b;
} {j k l m}
do_test e_fkey-41.3 {
catchsql COMMIT
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-41.4 {
execsql ROLLBACK
} {}
} {}
do_test e_fkey-41.3 {
catchsql { DELETE FROM parent WHERE p1 = 'a' }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-41.4 {
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
} {}
do_test e_fkey-42.2 {
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 {
execsql {
UPDATE parent SET x = 'key two' WHERE x = 'key2';
} {}
do_test e_fkey-42.5 {
catchsql { DELETE FROM parent WHERE x = 'key1' }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-42.6 {
execsql {
DELETE FROM parent WHERE x = 'key2';
} {}
do_test e_fkey-42.8 {
catchsql { REPLACE INTO parent VALUES('key1') }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-42.9 {
execsql {
REPLACE INTO parent VALUES('key2');
} {}
do_test e_fkey-43.2 {
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 {
execsql { UPDATE parent SET x = 'key two' WHERE x = 'key2' }
} {}
do_test e_fkey-43.4 {
catchsql COMMIT
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-43.5 {
execsql {
UPDATE child2 SET c = 'key two';
} {}
do_test e_fkey-43.7 {
catchsql { DELETE FROM parent WHERE x = 'key1' }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-43.8 {
execsql { DELETE FROM parent WHERE x = 'key2' }
} {}
do_test e_fkey-43.9 {
catchsql COMMIT
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-43.10 {
execsql {
UPDATE child2 SET c = NULL;
} {ONE two three}
do_test e_fkey-49.4 {
catchsql { UPDATE parent SET a = '' WHERE a = 'oNe' }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
#-------------------------------------------------------------------------
} {}
do_test e_fkey-50.2 {
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 {
execsql {
INSERT INTO artist VALUES(0, 'Unknown Artist');
}
execsql { INSERT INTO c5 VALUES('a', 'b') }
catchsql { DROP TABLE p }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-58.2 {
execsql { SELECT * FROM p }
} {a b}
BEGIN;
DROP TABLE p;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-58.4 {
execsql {
SELECT * FROM p;
} {}
do_test e_fkey-59.3 {
catchsql COMMIT
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-59.4 {
execsql { CREATE TABLE p(a, b, PRIMARY KEY(a, b)) }
catchsql COMMIT
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-59.5 {
execsql { INSERT INTO p VALUES('a', 'b') }
execsql COMMIT
# Check that the FK is enforced properly if there are no NULL values
# in the child key columns.
catchsql { INSERT INTO c VALUES('a', 2, 4) }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
}
#-------------------------------------------------------------------------
} {}
do_test e_fkey-62.4 {
catchsql { INSERT INTO ci VALUES('x', 'y') }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-62.5 {
catchsql { INSERT INTO cd VALUES('x', 'y') }
} {0 {}}
do_test e_fkey-62.6 {
catchsql { COMMIT }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test e_fkey-62.7 {
execsql {
DELETE FROM cd;
INSERT INTO a4 VALUES(3, 'a');
} {}
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.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.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')"
- {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')"
- {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'"
- {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'"
- {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')"
- {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}
} {
do_catchsql_test e_insert-4.1.$tn.1 $sql [list [expr {$error!=""}] $error]
} {}
foreach {tn sql error ac data } {
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"
{} 1 {2 two 3 one 4 four}
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"
{} 1 {2 three 3 one 4 four}
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}
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"
- {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'"
- {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"
{} 0 {2 two 3 one 4 four}
{} 0 {2 two 3 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_execsql_test e_update-1.8.$tn.2 {SELECT * FROM t3} [list {*}$data]
error_messages "INSERT INTO t1 VALUES('ghi', 'def')"
} [list {*}{
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
do_test 2.3 {
error_messages_v2 "INSERT INTO t1 VALUES('ghi', 'def')"
} [list {*}{
- SQLITE_CONSTRAINT {column b is not unique}
- SQLITE_CONSTRAINT {column b is not unique}
+ SQLITE_CONSTRAINT {UNIQUE constraint failed: t1.b}
+ SQLITE_CONSTRAINT {UNIQUE constraint failed: t1.b}
}]
verify_ex_errcode 2.3b SQLITE_CONSTRAINT_UNIQUE
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.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.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.9 "UPDATE t2 SET c=1 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.12 "UPDATE t1 SET a = 2" {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.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.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.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.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.9 "UPDATE t8 SET c=1 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.12 "UPDATE t7 SET b = 2" {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.13 "UPDATE t7 SET b = 1" {0 {}}
- 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.16 "UPDATE t7 SET rowid = 5" {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.16 "UPDATE t7 SET rowid = 5" {1 {FOREIGN KEY constraint failed}}
4.17 "UPDATE t7 SET a = 10" {0 {}}
5.1 "INSERT INTO t9 VALUES(1, 3)" {1 {no such table: main.nosuchtable}}
} {35.0 text}
do_test fkey2-1.5.2 {
catchsql { DELETE FROM i }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
# Same test using a regular primary key with integer affinity.
drop_all_tables
} {35.0 text 35 integer}
do_test fkey2-1.6.2 {
catchsql { DELETE FROM i }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
# Use a collation sequence on the parent key.
drop_all_tables
INSERT INTO j VALUES('sqlite');
}
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
# has an explicit value.
INSERT INTO i VALUES('SQLite');
}
catchsql { INSERT INTO j VALUES('sqlite') }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-1.7.3 {
execsql {
INSERT INTO i VALUES('sqlite');
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
#
proc fkey2-2-test {tn nocommit sql {res {}}} {
if {$res eq "FKV"} {
- set expected {1 {foreign key constraint failed}}
+ set expected {1 {FOREIGN KEY constraint failed}}
} else {
set expected [list 0 $res]
}
if {$nocommit} {
do_test fkey2-2.${tn}c {
catchsql COMMIT
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
}
}
fkey2-2-test 66 1 "INSERT INTO leaf VALUES('c', 1)"
do_test fkey2-2-test-67 {
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 69 1 "INSERT INTO node VALUES(1, NULL)"
fkey2-2-test 70 0 "INSERT INTO node VALUES(2, NULL)"
} {}
do_test fkey2-3.1.3 {
catchsql { UPDATE ab SET a = 5 }
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: ef}}
do_test fkey2-3.1.4 {
execsql { SELECT * FROM ab }
} {1 b}
do_test fkey2-3.1.4 {
execsql BEGIN;
catchsql { UPDATE ab SET a = 5 }
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: ef}}
do_test fkey2-3.1.5 {
execsql COMMIT;
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
do_test fkey2-3.2.1 {
execsql BEGIN;
catchsql { DELETE FROM ab }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-3.2.2 {
execsql COMMIT
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
} {}
do_test fkey2-7.2 {
catchsql { INSERT INTO t2 VALUES(1, 'A'); }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-7.3 {
execsql {
INSERT INTO t1 VALUES(1, 2);
} {}
do_test fkey2-7.5 {
catchsql { UPDATE t2 SET c = 3 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-7.6 {
catchsql { DELETE FROM t1 WHERE a = 2 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-7.7 {
execsql { DELETE FROM t1 WHERE a = 1 }
} {}
do_test fkey2-7.8 {
catchsql { UPDATE t1 SET a = 3 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-7.9 {
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
} {2 two}
do_test fkey2-9.1.5 {
catchsql { DELETE FROM t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-9.2.1 {
execsql {
} {}
do_test fkey2-12.1.4 {
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 {
execsql "DELETE FROM t1 WHERE b = 'two'"
} {}
do_test fkey2-12.1.6 {
catchsql "COMMIT"
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-12.1.7 {
execsql {
INSERT INTO t1 VALUES(2, 'two');
INSERT INTO t2 VALUES('b');
}
catchsql { DELETE FROM t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-12.2.4 {
execsql {
SELECT * FROM t1;
} {no possibly}
do_test fkey2-12.3.3 {
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 {
execsql {
INSERT INTO up(c34, c35) VALUES('yes', 'no');
INSERT INTO down(c39, c38) VALUES('yes', 'no');
}
catchsql { DELETE FROM up WHERE c34 = 'yes' }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-12.3.5 {
execsql {
DELETE FROM up WHERE c34 = 'possibly';
} {
do_test fkey2-13.1.$tn.1 {
catchsql $stmt
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-13.1.$tn.2 {
execsql {
SELECT * FROM pp;
do_test fkey2-13.1.$tn.3 {
execsql BEGIN;
catchsql $stmt
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-13.1.$tn.4 {
execsql {
COMMIT;
]
do_test fkey2-14.2.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 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test fkey2-14.2.2.5 {
catchsql { UPDATE t4 SET b = 5 }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-14.2.2.6 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
]
do_test fkey2-14.2tmp.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 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test fkey2-14.2tmp.2.5 {
catchsql { UPDATE t4 SET b = 5 }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-14.2tmp.2.6 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
]
do_test fkey2-14.2aux.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 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test fkey2-14.2aux.2.5 {
catchsql { UPDATE t4 SET b = 5 }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-14.2aux.2.6 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
} {}
do_test fkey-2.14.3.3 {
catchsql { DROP TABLE t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey-2.14.3.4 {
execsql {
DELETE FROM t2;
} {}
do_test fkey-2.14.3.6 {
catchsql { DROP TABLE t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey-2.14.3.7 {
execsql {
DROP TABLE t2;
do_test fkey2-16.1.$tn.3 {
catchsql { UPDATE self SET b = 15 }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-16.1.$tn.4 {
catchsql { UPDATE self SET a = 15 }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-16.1.$tn.5 {
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 {
catchsql { UPDATE self SET a = 17, b = 17 }
} {}
do_test fkey2-16.1.$tn.8 {
catchsql { INSERT INTO self VALUES(20, 21) }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
}
#-------------------------------------------------------------------------
INSERT INTO one VALUES(0, 0, 0);
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 {
execsql { SELECT * FROM one }
} {1 2 3 2 3 4 3 4 5 0 0 0}
}
do_test fkey2-18.8 {
catchsql { INSERT INTO short VALUES(1, 3, 2) }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-18.9 {
execsql { INSERT INTO short VALUES(1, 3, NULL) }
} {}
} {1 3 2 1 3 {}}
do_test fkey2-18.11 {
catchsql { UPDATE short SET f = 2 WHERE f IS NULL }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
db auth {}
unset authargs
} {
do_test fkey2-20.2.$tn.1 {
catchsql "$insert INTO cc VALUES(1, 2)"
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-20.2.$tn.2 {
execsql { SELECT * FROM cc }
} {}
INSERT INTO cc VALUES(1, 2);
}
catchsql "$insert INTO cc VALUES(3, 4)"
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-20.2.$tn.4 {
execsql { COMMIT ; SELECT * FROM cc }
} {1 2}
} {}
do_test fkey2-20.3.$tn.2 {
catchsql "$update pp SET a = 1"
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-20.3.$tn.3 {
execsql { SELECT * FROM pp }
} {2 two}
do_test fkey2-20.3.$tn.4 {
catchsql "$update cc SET d = 1"
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test fkey2-20.3.$tn.5 {
execsql { SELECT * FROM cc }
} {1 2}
INSERT INTO pp VALUES(3, 'three');
}
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 {
execsql { COMMIT ; SELECT * FROM pp }
} {2 two 3 three}
INSERT INTO cc VALUES(2, 2);
}
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 {
execsql { COMMIT ; SELECT * FROM cc }
} {1 2 2 2}
} {}
do_test fkey2-genfkey.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 {
execsql {
INSERT INTO t1 VALUES(1, 2, 3);
} {}
do_test fkey2-genfkey.1.5 {
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 {
execsql { UPDATE t2 SET e = 1 WHERE e IS NULL }
} {}
} {}
do_test fkey2-genfkey.1.8 {
catchsql { UPDATE t1 SET a = 10 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-genfkey.1.9 {
catchsql { UPDATE t1 SET a = NULL }
} {1 {datatype mismatch}}
do_test fkey2-genfkey.1.10 {
catchsql { DELETE FROM t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-genfkey.1.11 {
execsql { UPDATE t2 SET e = NULL }
} {}
} {}
do_test fkey2-genfkey.1.14 {
catchsql { INSERT INTO t3 VALUES(3, 1, 4) }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-genfkey.1.15 {
execsql {
INSERT INTO t1 VALUES(1, 1, 4);
} {}
do_test fkey2-genfkey.1.16 {
catchsql { DELETE FROM t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-genfkey.1.17 {
catchsql { UPDATE t1 SET b = 10}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-genfkey.1.18 {
execsql { UPDATE t1 SET a = 10}
} {}
do_test fkey2-genfkey.1.19 {
catchsql { UPDATE t3 SET h = 'hello' WHERE i = 3}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
drop_all_tables
do_test fkey2-genfkey.2.1 {
catchsql {
DELETE FROM tdd08;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-dd08e5.1.3 {
execsql {
SELECT * FROM tdd08;
catchsql {
INSERT INTO tdd08_b VALUES(400,500,300);
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-dd08e5.1.5 {
catchsql {
UPDATE tdd08_b SET x=x+1;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-dd08e5.1.6 {
catchsql {
UPDATE tdd08 SET a=a+1;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
#-------------------------------------------------------------------------
# Verify that ticket ce7c133ea6cc9ccdc1a60d80441f80b6180f5eba
catchsql {
UPDATE tce71 set b = 201 where a = 100;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-ce7c13.1.3 {
catchsql {
UPDATE tce71 set a = 101 where a = 100;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-ce7c13.1.4 {
execsql {
CREATE TABLE tce73(a INTEGER PRIMARY KEY, b, UNIQUE(a,b));
catchsql {
UPDATE tce73 set b = 201 where a = 100;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey2-ce7c13.1.6 {
catchsql {
UPDATE tce73 set a = 101 where a = 100;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
finish_test
catchsql {
DELETE FROM t1 WHERE x=100;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey3-1.3 {
catchsql {
DROP TABLE t1;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey3-1.4 {
execsql {
} {}
do_catchsql_test 3.1.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 {
INSERT INTO t3 VALUES(NULL, 3, 5, 2);
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_execsql_test 3.2.1 {
CREATE TABLE t4(a UNIQUE, b REFERENCES t4(a));
}
do_catchsql_test 3.2.2 {
INSERT INTO t4 VALUES(NULL, 1);
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_execsql_test 3.3.1 {
CREATE TABLE t5(a INTEGER PRIMARY KEY, b REFERENCES t5(a));
} {}
do_catchsql_test 3.3.2 {
INSERT INTO t5 VALUES(NULL, 3);
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_execsql_test 3.4.1 {
CREATE TABLE t6(a INTEGER PRIMARY KEY, b, c, d,
do_execsql_test 3.4.5 { INSERT INTO t6 VALUES(5, 'a', 2, 'a'); } {}
do_catchsql_test 3.4.6 {
INSERT INTO t6 VALUES(NULL, 'a', 65, 'a');
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_execsql_test 3.4.7 {
INSERT INTO t6 VALUES(100, 'one', 100, 'one');
do_execsql_test 3.5.3 { INSERT INTO t7 VALUES('x', 2, 'x', 2) } {}
do_catchsql_test 3.5.4 {
INSERT INTO t7 VALUES('x', 450, 'x', NULL);
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_catchsql_test 3.5.5 {
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_catchsql_test 3.6.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.4 { UPDATE t8 SET e = 2; }
INSERT INTO TestTable VALUES (1, 'parent', 1, null);
INSERT INTO TestTable VALUES (2, 'child', 1, 1);
UPDATE TestTable SET parent_id=1000 where id=2;
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
finish_test
} {}
do_test fkey6-1.2 {
catchsql {DELETE FROM t1 WHERE x=2;}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test fkey6-1.3 {
sqlite3_db_status db DBSTATUS_DEFERRED_FKS 0
} {0 0 0}
} {1 0 1 0}
do_test fkey6-1.10.2 {
catchsql {DELETE FROM t1 WHERE x=3}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
db eval {ROLLBACK}
do_test fkey6-1.20 {
finish_test
-
catchsql {
INSERT INTO t1 (x) VALUES (NULL);
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.3 {
catchsql {
INSERT INTO t1 (x) VALUES (NULL);
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.4 {
catchsql {
INSERT INTO t1 (x) VALUES ('');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.5 {
catchsql {
INSERT INTO t1 (x) VALUES ('bad');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.6 {
catchsql {
INSERT INTO t1 (x) VALUES ('1234bad');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.7 {
catchsql {
INSERT INTO t1 (x) VALUES ('1234.56bad');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.8 {
catchsql {
INSERT INTO t1 (x) VALUES (1234);
catchsql {
INSERT INTO t1 (x) VALUES (1234.56);
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.10 {
catchsql {
INSERT INTO t1 (x) VALUES ('1234');
catchsql {
INSERT INTO t1 (x) VALUES ('1234.56');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.12 {
catchsql {
INSERT INTO t1 (x) VALUES (ZEROBLOB(4));
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.13 {
catchsql {
INSERT INTO t1 (x) VALUES (X'');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.14 {
catchsql {
INSERT INTO t1 (x) VALUES (X'1234');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.15 {
catchsql {
INSERT INTO t1 (x) VALUES (X'12345678');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.16 {
catchsql {
INSERT INTO t1 (x) VALUES ('1234.00');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
do_test func4-3.17 {
catchsql {
INSERT INTO t1 (x) VALUES (1234.00);
catchsql {
INSERT INTO t1 (x) VALUES ('-9223372036854775809');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
if {$highPrecision(1)} {
do_test func4-3.19 {
catchsql {
INSERT INTO t1 (x) VALUES (9223372036854775808);
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t1}}
}
do_execsql_test func4-3.20 {
SELECT x FROM t1 ORDER BY x;
catchsql {
INSERT INTO t2 (x) VALUES (NULL);
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.3 {
catchsql {
INSERT INTO t2 (x) VALUES (NULL);
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.4 {
catchsql {
INSERT INTO t2 (x) VALUES ('');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.5 {
catchsql {
INSERT INTO t2 (x) VALUES ('bad');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.6 {
catchsql {
INSERT INTO t2 (x) VALUES ('1234bad');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.7 {
catchsql {
INSERT INTO t2 (x) VALUES ('1234.56bad');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.8 {
catchsql {
INSERT INTO t2 (x) VALUES (1234);
catchsql {
INSERT INTO t2 (x) VALUES (ZEROBLOB(4));
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.13 {
catchsql {
INSERT INTO t2 (x) VALUES (X'');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.14 {
catchsql {
INSERT INTO t2 (x) VALUES (X'1234');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_test func4-4.15 {
catchsql {
INSERT INTO t2 (x) VALUES (X'12345678');
}
- } {1 {constraint failed}}
+ } {1 {CHECK constraint failed: t2}}
do_execsql_test func4-4.16 {
SELECT x FROM t2 ORDER BY x;
} {1234.0 1234.0 1234.56 1234.56}
catchsql {
INSERT INTO t5 VALUES(4);
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t5}}
# Ticket #1821
#
} {cccccccccccccccccccc}
do_test incrblob2-8.5 {
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 {
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 {
sqlite3_blob_read $h 0 20
} {cccccccccccccccccccc}
do_test incrblob2-8.8 {
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 {
set rc [catch {sqlite3_blob_read $h 0 20} msg]
list $rc $msg
BEGIN;
INSERT INTO t7 VALUES(1);
}
- } {1 {column a is not unique}}
+ } {1 {UNIQUE constraint failed: t7.a}}
do_test index-19.3 {
catchsql {
BEGIN;
catchsql {
INSERT INTO t8 VALUES(1);
}
- } {1 {column a is not unique}}
+ } {1 {UNIQUE constraint failed: t8.a}}
do_test index-19.5 {
catchsql {
BEGIN;
BEGIN;
CREATE UNIQUE INDEX i1 ON t1(a);
}
-} {1 {indexed columns are not unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test index3-1.3 {
catchsql COMMIT;
} {0 {}}
}
do_catchsql_test 2.2 {
CREATE UNIQUE INDEX i3 ON t2(x);
-} {1 {indexed columns are not unique}}
+} {1 {UNIQUE constraint failed: t2.x}}
finish_test
catchsql {
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 {
# can insert multiple rows with a==999 because such rows are not
# part of the unique index.
catchsql {
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 {
# can insert multiple rows with a==999 because such rows are not
# part of the unique index.
catchsql {
INSERT INTO t1 SELECT * FROM t2;
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
xferopt_test insert4-1.2 0
do_test insert4-1.3 {
execsql {
INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
SELECT * FROM t1;
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
xferopt_test insert4-2.3.4 0
# Do not run the transfer optimization if there is a DISTINCT
DELETE FROM t1;
INSERT INTO t1 SELECT DISTINCT * FROM t2;
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t1}}
xferopt_test insert4-2.4.4 0
# The following procedure constructs two tables then tries to transfer
catchsql {
INSERT INTO t6b SELECT * FROM t6a;
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t6b}}
do_test insert4-6.7 {
execsql {
DROP TABLE t6b;
catchsql {
INSERT INTO t6b SELECT * FROM t6a;
}
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: t6b}}
# Ticket [6284df89debdfa61db8073e062908af0c9b6118e]
# Disable the xfer optimization if the destination table contains
catchsql {
INSERT INTO t7b SELECT * FROM t7c;
}
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test insert4-7.4 {
execsql {SELECT * FROM t7b}
} {}
catchsql {
INSERT INTO t1 SELECT * FROM t2;
}
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test insert4-8.6 {
execsql {
SELECT * FROM t1;
catchsql {
INSERT INTO t1 SELECT * FROM t2;
}
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test insert4-8.8 {
execsql {
SELECT * FROM t1;
INSERT INTO t1 VALUES(2,3);
INSERT INTO t1 SELECT * FROM t2;
}
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test insert4-8.10 {
catchsql {COMMIT}
} {1 {cannot commit - no transaction is active}}
INSERT INTO t1 VALUES(5,'second','entry');
}} msg]
lappend r $msg
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test intpkey-1.7 {
execsql {
SELECT rowid, * FROM t1;
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 {
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
if {$conf2!=""} {set conf2 "ON CONFLICT $conf2"}
catchsql {
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 {
catchsql {
INSERT INTO t5 VALUES(0,2,4);
INSERT INTO t1(b,c,d,e) VALUES(2,3,4,5);
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
do_test notnull-1.3 {
catchsql {
INSERT OR REPLACE INTO t1(b,c,d,e) VALUES(2,3,4,5);
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
do_test notnull-1.5 {
catchsql {
INSERT OR ABORT INTO t1(b,c,d,e) VALUES(2,3,4,5);
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
do_test notnull-1.6 {
catchsql {
INSERT INTO t1(a,b,c,d,e) VALUES(1,null,3,4,5);
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
do_test notnull-1.11 {
catchsql {
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,null,4,5);
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
do_test notnull-1.17 {
catchsql {
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,3,null,5);
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
do_test notnull-1.18 {
catchsql {
INSERT INTO t1(a,b,c,d,e) VALUES(1,2,3,4,null);
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
do_test notnull-1.21 {
catchsql {
UPDATE t1 SET a=null;
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
do_test notnull-2.2 {
catchsql {
UPDATE OR REPLACE t1 SET a=null;
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
do_test notnull-2.3 {
catchsql {
UPDATE OR ABORT t1 SET a=null;
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
do_test notnull-2.5 {
catchsql {
UPDATE t1 SET b=null;
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
do_test notnull-2.6 {
catchsql {
UPDATE t1 SET e=null, a=b, b=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
do_test notnull-3.0 {
INSERT INTO t1(b,c,d,e) VALUES(2,3,4,5);
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
do_test notnull-3.3 {
catchsql {
INSERT OR REPLACE INTO t1(b,c,d,e) VALUES(2,3,4,5);
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
do_test notnull-3.5 {
catchsql {
INSERT OR ABORT INTO t1(b,c,d,e) VALUES(2,3,4,5);
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
do_test notnull-3.6 {
catchsql {
INSERT INTO t1(a,b,c,d,e) VALUES(1,null,3,4,5);
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
do_test notnull-3.11 {
catchsql {
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,null,4,5);
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
do_test notnull-3.17 {
catchsql {
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,3,null,5);
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
do_test notnull-3.18 {
catchsql {
INSERT INTO t1(a,b,c,d,e) VALUES(1,2,3,4,null);
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
do_test notnull-3.21 {
catchsql {
UPDATE t1 SET a=null;
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
do_test notnull-4.2 {
catchsql {
UPDATE OR REPLACE t1 SET a=null;
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
do_test notnull-4.3 {
catchsql {
UPDATE OR ABORT t1 SET a=null;
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
do_test notnull-4.5 {
catchsql {
UPDATE t1 SET b=null;
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
do_test notnull-4.6 {
catchsql {
UPDATE t1 SET e=null, a=b, b=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
# Test that bug 29ab7be99f is fixed.
INSERT INTO t1 VALUES(1, 2);
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
do_test notnull-5.3 {
execsql { SELECT * FROM t1 }
INSERT INTO t1 SELECT * FROM t2;
COMMIT;
}
-} {1 {t1.b may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.b}}
verify_ex_errcode notnull-5.4b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-5.5 {
execsql { SELECT * FROM t1 }
} {3 0}
do_catchsql_test pager1-3.1.3 {
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.5 { SELECT a FROM t1 } {1 2 3}
do_execsql_test pager1-3.6 { COMMIT } {}
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;
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.rowid}}
do_execsql_test pager1-14.1.5 {
COMMIT;
SELECT * FROM t1;
catchsql {
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
#
SAVEPOINT sp2;
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 {
sqlite3_get_autocommit db
} {1}
} {1 2 3}
do_test schema5-1.2 {
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 {
db eval {
DROP TABLE t1;
} {1 2 3}
do_test schema5-1.4 {
catchsql {INSERT INTO t1 VALUES(10,11,12);}
-} {1 {constraint two failed}}
+} {1 {CHECK constraint failed: two}}
do_test schema5-1.5 {
db eval {
DROP TABLE t1;
} {}
do_test schema5-1.6 {
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 {
catchsql {INSERT INTO t1 VALUES(10,2,3)}
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.b, t1.c}}
CREATE TABLE t6(a REFERENCES t4(a) NOT 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 {
catchsql {
DROP TABLE t6;
INSERT INTO t1 VALUES(1, 2);
COMMIT;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t1.b}}
do_test tkt-4a03ed-1.2 {
db eval {
PRAGMA integrity_check;
catchsql {
INSERT INTO ""("") VALUES(1);
}
-} {1 {column is not unique}}
+} {1 {UNIQUE constraint failed: .}}
do_test tkt-78e04-1.2 {
execsql {
PRAGMA table_info("");
DROP TABLE pp1;
DROP TABLE cc1;
COMMIT;
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_catchsql_test 3.3 {
DROP TABLE cc2;
COMMIT;
catchsql {
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 {
execsql {
COMMIT;
catchsql {
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 {
execsql {
COMMIT;
DROP TABLE t5;
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 {
# Show that the transaction has not been rolled back.
catchsql BEGIN
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
} {}
do_test triggerC-1.15 {
catchsql { UPDATE OR ROLLBACK t1 SET a=100 }
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
#-------------------------------------------------------------------------
catchsql {
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
do_test unique-1.4 {
execsql {
catchsql {
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
do_test unique-1.6 {
execsql {
catchsql {
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
do_test unique-2.4 {
catchsql {
catchsql {
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
do_test unique-2.9 {
catchsql {
INSERT INTO t3(a,b,c,d) VALUES(1,4,3,5);
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
integrity_check unique-3.5
} {0 {}}
do_test unique-4.10 {
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
integrity_check unique-4.99
catchsql {
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
UPDATE t1 SET a=1, e=10 WHERE f=7;
SELECT * FROM t1;
}
-} {1 {PRIMARY KEY must be unique}}
+} {1 {UNIQUE constraint failed: t1.a}}
do_test update-10.4 {
catchsql {
SELECT * FROM t1;
UPDATE t1 SET b=2, e=12 WHERE f=7;
SELECT * FROM t1;
}
-} {1 {column b is not unique}}
+} {1 {UNIQUE constraint failed: t1.b}}
do_test update-10.7 {
catchsql {
SELECT * FROM t1;
UPDATE t1 SET c=3, d=4, e=14 WHERE f=7;
SELECT * FROM t1;
}
-} {1 {columns c, d are not unique}}
+} {1 {UNIQUE constraint failed: t1.c, t1.d}}
do_test update-10.10 {
catchsql {
SELECT * FROM t1;
# First test outside of a transaction.
do_test vtab1.12-2 {
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 {
sqlite3_errmsg db
-} {echo-vtab-error: column a is not unique}
+} {echo-vtab-error: UNIQUE constraint failed: c.a}
do_test vtab1.12-3 {
execsql { SELECT * FROM c }
} {3 G H}
do_test vtab1.12-4 {
execsql {BEGIN}
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 {
execsql { SELECT * FROM c }
} {3 G H}
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 {
execsql {
COMMIT;
catchsql {
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.
#
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.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.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.9 "UPDATE t2 SET c=1 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.12 "UPDATE t1 SET a = 2" {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.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.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.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.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.9 "UPDATE t8 SET c=1 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.12 "UPDATE t7 SET b = 2" {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.13 "UPDATE t7 SET b = 1" {0 {}}
- 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.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.17 "UPDATE t7 SET a = 10" {0 {}}
5.1 "INSERT INTO t9 VALUES(1, 3)" {1 {no such table: main.nosuchtable}}
} {35.0 text}
do_test without_rowid3-1.5.2 {
catchsql { DELETE FROM i }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
# Same test using a regular primary key with integer affinity.
drop_all_tables
} {35.0 text 35 integer}
do_test without_rowid3-1.6.2 {
catchsql { DELETE FROM i }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
# Use a collation sequence on the parent key.
drop_all_tables
INSERT INTO j VALUES('sqlite');
}
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
# has an explicit value.
INSERT INTO i 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 {
execsql {
INSERT INTO i VALUES('sqlite');
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
#
proc without_rowid3-2-test {tn nocommit sql {res {}}} {
if {$res eq "FKV"} {
- set expected {1 {foreign key constraint failed}}
+ set expected {1 {FOREIGN KEY constraint failed}}
} else {
set expected [list 0 $res]
}
if {$nocommit} {
do_test without_rowid3-2.${tn}c {
catchsql COMMIT
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
}
}
without_rowid3-2-test 66 1 "INSERT INTO leaf VALUES('c', 1)"
do_test without_rowid3-2-test-67 {
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 69 1 "INSERT INTO node VALUES(1, NULL)"
without_rowid3-2-test 70 0 "INSERT INTO node VALUES(2, NULL)"
} {}
do_test without_rowid3-3.1.3 {
catchsql { UPDATE ab SET a = 5 }
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: ef}}
do_test without_rowid3-3.1.4 {
execsql { SELECT * FROM ab }
} {1 b}
do_test without_rowid3-3.1.4 {
execsql BEGIN;
catchsql { UPDATE ab SET a = 5 }
-} {1 {constraint failed}}
+} {1 {CHECK constraint failed: ef}}
do_test without_rowid3-3.1.5 {
execsql COMMIT;
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
do_test without_rowid3-3.2.1 {
execsql BEGIN;
catchsql { DELETE FROM ab }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-3.2.2 {
execsql COMMIT
execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
} {}
do_test without_rowid3-7.2 {
catchsql { INSERT INTO t2 VALUES(1, 'A'); }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-7.3 {
execsql {
INSERT INTO t1 VALUES(1, 2);
} {}
do_test without_rowid3-7.5 {
catchsql { UPDATE t2 SET c = 3 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-7.6 {
catchsql { DELETE FROM t1 WHERE a = 2 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-7.7 {
execsql { DELETE FROM t1 WHERE a = 1 }
} {}
do_test without_rowid3-7.8 {
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
} {2 two}
do_test without_rowid3-9.1.5 {
catchsql { DELETE FROM t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-9.2.1 {
execsql {
} {}
do_test without_rowid3-12.1.4 {
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 {
execsql "DELETE FROM t1 WHERE b = 'two'"
} {}
do_test without_rowid3-12.1.6 {
catchsql "COMMIT"
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-12.1.7 {
execsql {
INSERT INTO t1 VALUES(2, 'two');
INSERT INTO t2 VALUES('b');
}
catchsql { DELETE FROM t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-12.2.4 {
execsql {
SELECT * FROM t1;
} {no possibly}
do_test without_rowid3-12.3.3 {
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 {
execsql {
INSERT INTO up(c34, c35) VALUES('yes', 'no');
INSERT INTO down(c39, c38) VALUES('yes', 'no');
}
catchsql { DELETE FROM up WHERE c34 = 'yes' }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-12.3.5 {
execsql {
DELETE FROM up WHERE c34 = 'possibly';
} {
do_test without_rowid3-13.1.$tn.1 {
catchsql $stmt
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-13.1.$tn.2 {
execsql {
SELECT * FROM pp;
do_test without_rowid3-13.1.$tn.3 {
execsql BEGIN;
catchsql $stmt
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-13.1.$tn.4 {
execsql {
COMMIT;
]
do_test without_rowid3-14.2.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 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test without_rowid3-14.2.2.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 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
]
do_test without_rowid3-14.2tmp.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 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test without_rowid3-14.2tmp.2.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 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
]
do_test without_rowid3-14.2aux.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 {
execsql { INSERT INTO t4 VALUES(1, NULL) }
} {}
do_test without_rowid3-14.2aux.2.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 {
catchsql { UPDATE t4 SET b = 1 }
} {0 {}}
} {}
do_test without_rowid3-2.14.3.3 {
catchsql { DROP TABLE t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-2.14.3.4 {
execsql {
DELETE FROM t2;
} {}
do_test without_rowid3-2.14.3.6 {
catchsql { DROP TABLE t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-2.14.3.7 {
execsql {
DROP TABLE t2;
do_test without_rowid3-16.1.$tn.3 {
catchsql { UPDATE self SET b = 15 }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-16.1.$tn.4 {
catchsql { UPDATE self SET a = 15 }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-16.1.$tn.5 {
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 {
catchsql { UPDATE self SET a = 17, b = 17 }
} {}
do_test without_rowid3-16.1.$tn.8 {
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
catchsql {
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 {
catchsql {
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 {
DELETE FROM t1 WHERE a=1;
catchsql {
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 {
catchsql {
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 {
DELETE FROM t1 WHERE a=1;
INSERT INTO one VALUES(0, 0, 0);
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 {
execsql { SELECT * FROM one }
} {1 2 3 2 3 4 3 4 5 0 0 0}
}
do_test without_rowid3-18.8 {
catchsql { INSERT INTO short VALUES(1, 3, 2) }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-18.9 {
execsql { INSERT INTO short VALUES(1, 3, NULL) }
} {}
} {1 3 2 1 3 {}}
do_test without_rowid3-18.11 {
catchsql { UPDATE short SET f = 2 WHERE f IS NULL }
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
db auth {}
unset authargs
} {
do_test without_rowid3-20.2.$tn.1 {
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 {
execsql { SELECT * FROM cc }
} {}
INSERT INTO cc VALUES(1, 2);
}
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 {
execsql { COMMIT ; SELECT * FROM cc }
} {1 2}
} {}
do_test without_rowid3-20.3.$tn.2 {
catchsql "$update pp SET a = 1"
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-20.3.$tn.3 {
execsql { SELECT * FROM pp }
} {2 two}
do_test without_rowid3-20.3.$tn.4 {
catchsql "$update cc SET d = 1"
- } {1 {foreign key constraint failed}}
+ } {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-20.3.$tn.5 {
execsql { SELECT * FROM cc }
} {1 2}
INSERT INTO pp VALUES(3, 'three');
}
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 {
execsql { COMMIT ; SELECT * FROM pp }
} {2 two 3 three}
INSERT INTO cc VALUES(2, 2);
}
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 {
execsql { COMMIT ; SELECT * FROM cc }
} {1 2 2 2}
} {}
do_test without_rowid3-genfkey.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 {
execsql {
INSERT INTO t1 VALUES(1, 2, 3);
} {}
do_test without_rowid3-genfkey.1.5 {
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 {
execsql { UPDATE t2 SET e = 1 WHERE e IS NULL }
} {}
} {}
do_test without_rowid3-genfkey.1.8 {
catchsql { UPDATE t1 SET a = 10 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.9 {
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 {
catchsql { DELETE FROM t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.11 {
execsql { UPDATE t2 SET e = NULL }
} {}
} {}
do_test without_rowid3-genfkey.1.14 {
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 {
execsql {
INSERT INTO t1 VALUES(1, 1, 4);
} {}
do_test without_rowid3-genfkey.1.16 {
catchsql { DELETE FROM t1 }
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.17 {
catchsql { UPDATE t1 SET b = 10}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-genfkey.1.18 {
execsql { UPDATE t1 SET a = 10}
} {}
do_test without_rowid3-genfkey.1.19 {
catchsql { UPDATE t3 SET h = 'hello' WHERE i = 3}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
drop_all_tables
do_test without_rowid3-genfkey.2.1 {
catchsql {
DELETE FROM tdd08;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-dd08e5.1.3 {
execsql {
SELECT * FROM tdd08;
catchsql {
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 {
catchsql {
UPDATE tdd08_b SET x=x+1;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
do_test without_rowid3-dd08e5.1.6 {
catchsql {
UPDATE tdd08 SET a=a+1;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
#-------------------------------------------------------------------------
# Verify that ticket ce7c133ea6cc9ccdc1a60d80441f80b6180f5eba
catchsql {
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 {
catchsql {
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 {
execsql {
CREATE TABLE tce73(a INTEGER PRIMARY KEY, b, UNIQUE(a,b)) WITHOUT rowid;
catchsql {
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 {
catchsql {
UPDATE tce73 set a = 101 where a = 100;
}
-} {1 {foreign key constraint failed}}
+} {1 {FOREIGN KEY constraint failed}}
finish_test
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;
catchsql {
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 {
execsql {
SELECT * from tbl;