]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Include the original text of the CHECK constraint in the error message for
authordrh <drh@noemail.net>
Thu, 27 Aug 2020 18:36:30 +0000 (18:36 +0000)
committerdrh <drh@noemail.net>
Thu, 27 Aug 2020 18:36:30 +0000 (18:36 +0000)
anonymous CHECK constraints.

FossilOrigin-Name: 5ce34a955bb36d77edc9951cb7ac2ef9c876d7d3ff5852af682f558e248f428c

19 files changed:
manifest
manifest.uuid
src/build.c
src/parse.y
src/sqliteInt.h
test/check.test
test/conflict.test
test/conflict2.test
test/date2.test
test/e_createtable.test
test/fkey2.test
test/func4.test
test/in.test
test/insert4.test
test/istrue.test
test/pager1.test
test/quote.test
test/without_rowid1.test
test/without_rowid3.test

index 3e351a9423ad92f4fc17a09ec1d026878d1c14de..75c9acebcb1acae06bedbdcc770a4aa6b2d77e99 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Apple\sthe\ssame\sfix\sfor\sticket\s[9eda2697f5cc1aba]\sto\stext-to-integer\nconversions\sthat\swas\sdone\sfor\sfloating\spoint\sconversions\sby\ncheck-in\s[1c76f1d8ec0937a2].
-D 2020-08-27T16:28:30.075
+C Include\sthe\soriginal\stext\sof\sthe\sCHECK\sconstraint\sin\sthe\serror\smessage\sfor\nanonymous\sCHECK\sconstraints.
+D 2020-08-27T18:36:30.231
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -479,7 +479,7 @@ F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
 F src/btree.c 634381c86f363dfd470c9dbe64c07363e746cb9917573f67381c861b1d264d8d
 F src/btree.h c299ab8b279230de1ef457f298ade9848c7339de6ef88a55beaf62bf0345eb15
 F src/btreeInt.h d1f713b2947a054c3532154a4d6b2bb8c4698fb54432f171966bdd06728ab1be
-F src/build.c a80bc79f0be20185e2005b74e9a23f8abb8fbb3cc54ed769a21865f79d507d90
+F src/build.c 92b61c2be1e35a619391f17c2d1b108901ad5e4df99becc0b064a934e6ec662a
 F src/callback.c d0b853dd413255d2e337b34545e54d888ea02f20da5ad0e63585b389624c4a6c
 F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
 F src/ctime.c e98518d2d3d4029a13c805e07313fb60c877be56db76e90dd5f3af73085d0ce6
@@ -524,7 +524,7 @@ F src/os_win.c a2149ff0a85c1c3f9cc102a46c673ce87e992396ba3411bfb53db66813b32f1d
 F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
 F src/pager.c 3700a1c55427a3d4168ad1f1b8a8b0cb9ace1d107e4506e30a8f1e66d8a1195e
 F src/pager.h 4bf9b3213a4b2bebbced5eaa8b219cf25d4a82f385d093cd64b7e93e5285f66f
-F src/parse.y 5bdb760a29c0b25caf7e80e82210b81cd2ea3066d5199ca29e6eac40b34bc184
+F src/parse.y 2ca57a8383e9cf9e1140706a85a4b357d6c09cfea7ba9098746a28bc8212441a
 F src/pcache.c 385ff064bca69789d199a98e2169445dc16e4291fa807babd61d4890c3b34177
 F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
 F src/pcache1.c 6596e10baf3d8f84cc1585d226cf1ab26564a5f5caf85a15757a281ff977d51a
@@ -540,7 +540,7 @@ F src/shell.c.in d9aae37f76cc45b4ef6e8949979dbd124f9e5031789116c85d1aca396a37a40
 F src/sqlite.h.in b91e4a5b9b25eb95260be0bf9716d2bdba0da06b72eb439f41592b226f58881d
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
 F src/sqlite3ext.h 2d1af80082edffd71c6f96f70ad1ce6a4fb46615ad10291fc77fe0dea9ff0197
-F src/sqliteInt.h 7dd1f3a93e801c90cf108149d041c6cc32d3e9503d66aa415455dae1614b6b53
+F src/sqliteInt.h d8d69318b1ba3906d4860da1cd1c6b3650b81c9595e5bc360c6469a1e54e09e1
 F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
 F src/status.c 4b8bc2a6905163a38b739854a35b826c737333fab5b1f8e03fa7eb9a4799c4c1
 F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
@@ -740,7 +740,7 @@ F test/capi3d.test aba917805573a03deed961a21f07a5a84505ad0a616f7e3fc1508844a15bc
 F test/capi3e.test 3d49c01ef2a1a55f41d73cba2b23b5059ec460fe
 F test/cast.test 2906ccab6a3ebd147ffa63304b635be903ce58264110d0a0eb4fd9939422bb53
 F test/cffault.test 9d6b20606afe712374952eec4f8fd74b1a8097ef
-F test/check.test 9776af795bb5d0f197b7f8fe248052e3ca2ed35304d863efcdbf8b1316e11f65
+F test/check.test 4a2a91ed67eee84a6be16057c48d5198b6fb24849cd6da6cd855981de3fbb416
 F test/checkfault.test da6cb3d50247169efcb20bdf57863a3ccfa1d27d9e55cd324f0680096970f014
 F test/chunksize.test 427d87791743486cbf0c3b8c625002f3255cb3a89c6eba655a98923b1387b760
 F test/close.test eccbad8ecd611d974cbf47278c3d4e5874faf02d811338d5d348af42d56d647c
@@ -759,8 +759,8 @@ F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
 F test/collateB.test 1e68906951b846570f29f20102ed91d29e634854ee47454d725f2151ecac0b95
 F test/colmeta.test 2c765ea61ee37bc43bbe6d6047f89004e6508eb1
 F test/colname.test 87ad5458bb8709312dac0d6755fd30e8e4ca83298d0a9ef6e5c24277a3c3390e
-F test/conflict.test 58857e2533fb9f2e0358ea7cb191215657846be1dd9da3b3d6df3e750c02ae03
-F test/conflict2.test bb0b94cf7196c64a3cbd815c66d3ee98c2fecd9c
+F test/conflict.test ac0667090f66130ac77d5fb764655558ca6600dd6d88f670ca9123b61c448337
+F test/conflict2.test 5557909ce683b1073982f5d1b61dfb1d41e369533bfdaf003180c5bc87282dd1
 F test/conflict3.test 81865d9599609aca394fb3b9cd5f561d4729ea5b176bece3644f6ecb540f88ac
 F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4
 F test/corrupt.test d7cb0300e4a297147b6a05e92a1684bc8973635c3bcaa3d66e983c9cbdbf47a3
@@ -807,7 +807,7 @@ F test/cursorhint.test 0175e4404181ace3ceca8b114eb0a98eae600d565aa4e2705abbe6614
 F test/cursorhint2.test 6f3aa9cb19e7418967a10ec6905209bcbb5968054da855fc36c8beee9ae9c42f
 F test/dataversion1.test 6e5e86ac681f0782e766ebcb56c019ae001522d114e0e111e5ebf68ccf2a7bb8
 F test/date.test 9b73bbeb1b82d9c1f44dec5cf563bf7da58d2373
-F test/date2.test 5ef8265c71460cda6b1698bf18f4bb0ffb40ac08c5092f6afe84d398c2feb5be
+F test/date2.test 520a1708e4e14c682cf514560f3e9f2e5affa9d66560fbc2a6941ae291260daf
 F test/dbdata.test 042f49acff3438f940eeba5868d3af080ae64ddf26ae78f80c92bec3ca7d8603
 F test/dbfuzz.c 73047c920d6210e5912c87cdffd9a1c281d4252e
 F test/dbfuzz001.test 55e1a3504f8dea84155e09912fe3b1c3ad77e0b1a938ec42ca03b8e51b321e30
@@ -835,7 +835,7 @@ F test/e_blobclose.test 4b3c8c60c2171164d472059c73e9f3c1844bb66d
 F test/e_blobopen.test e95e1d40f995056f6f322cd5e1a1b83a27e1a145
 F test/e_blobwrite.test f87ff598b67af5b3ec002a8d83e804dc8d23808e88cf0080c176612fc9ffce14
 F test/e_changes.test fd66105385153dbf21fdb35eb8ef6c3e1eade579
-F test/e_createtable.test ea27082d6f84df61e1d9e383f3fd79220418856a4a8afc41af75d458b8e7ac33
+F test/e_createtable.test 7107f5deda2324ea12dbf105044dc9265195401e9dbb3eead6a2c1a3da4bb5b7
 F test/e_delete.test ab39084f26ae1f033c940b70ebdbbd523dc4962e
 F test/e_droptrigger.test 235c610f8bf8ec44513e222b9085c7e49fad65ad0c1975ac2577109dd06fd8fa
 F test/e_dropview.test 74e405df7fa0f762e0c9445b166fe03955856532e2bb234c372f7c51228d75e7
@@ -879,7 +879,7 @@ F test/filter2.tcl 44e525497ce07382915f01bd29ffd0fa49dab3adb87253b5e5103ba8f9339
 F test/filter2.test 485cf95d1f6d6ceee5632201ca52a71868599836f430cdee42e5f7f14666e30a
 F test/filterfault.test c08fb491d698e8df6c122c98f7db1c65ffcfcad2c1ab0e07fa8a5be1b34eaa8b
 F test/fkey1.test d11dbb8a93ead9b5c46ae5d02da016d61245d47662fb2d844c99214f6163f768
-F test/fkey2.test b1b6a8c5556dc0ccf31291b1fed8aa57e404b38f3236110e19ab4dc6aa93edf2
+F test/fkey2.test 1063d65e5923c054cfb8f0555a92a3ae0fa8c067275a33ee1715bd856cdb304c
 F test/fkey3.test 76d475c80b84ee7a5d062e56ccb6ea68882e2b49
 F test/fkey4.test 86446017011273aad8f9a99c1a65019e7bd9ca9d
 F test/fkey5.test 6727452e163a427147e84e739da18713da553d79f9783559b04fdcd36d5c7421
@@ -1017,7 +1017,7 @@ F test/full.test 6b3c8fb43c6beab6b95438c1675374b95fab245d
 F test/func.test f673822636fb8ed618dd2b80230d16e495d19c8f2e2e7d6c22e93e2b3de097ad
 F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
 F test/func3.test 2bb0f31ab7baaed690b962a88544d7be6b34fa389364bc36a44e441ed3e3f1e6
-F test/func4.test a94858a8c1f10a408b0b3db439c990b59dbb2349411d503de011ac4e2b5f27a6
+F test/func4.test 2285fb5792d593fef442358763f0fd9de806eda47dbc7a5934df57ffdc484c31
 F test/func5.test 863e6d1bd0013d09c17236f8a13ea34008dd857d87d85a13a673960e4c25d82a
 F test/func6.test 90e42b64c4f9fb6f04f44cb8a1da586c8542502e926b19c76504fe74ff2a9b7c
 F test/fuzz-oss1.test e58330d01cbbd8215ee636b17a03fe220b37dbfa
@@ -1050,7 +1050,7 @@ F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
 F test/icu.test 716a6b89fbabe5cc63e0cd4c260befb08fd7b9d761f04d43669233292f0753b1
 F test/ieee754.test b0945d12be7d255f3dfa18e2511b17ca37e0edd2b803231c52d05b86c04ab26e
 F test/imposter1.test c3f1db2d3db2c24611a6596a3fc0ffc14f1466c8
-F test/in.test 95a704448eaa348300a517df267b37488c854aa0713125f4fa7b6280cfd4ed0f
+F test/in.test 688ed2011d922d83141a45af431601738674a4c0bdde34b6351f688b82a169b3
 F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
 F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
 F test/in4.test 65460600d48933adba4283c6ebd089aae173d16136ab9d01f74c89089090c5a5
@@ -1084,7 +1084,7 @@ F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
 F test/insert.test 4e3f0de67aac3c5be1f4aaedbcea11638f1b5cdc9a3115be14d19aa9db7623c6
 F test/insert2.test 4d14b8f1b810a41995f6286b64a6943215d52208
 F test/insert3.test 1b7db95a03ad9c5013fdf7d6722b6cd66ee55e30
-F test/insert4.test fb9e0f752c75f453555990250b449f6d123ae6a3ebf054d14e4470de4498dce3
+F test/insert4.test 59cb99521be01a5aefc9be8e8b5a51ee7f3944781d4d7f6201b9f774fcd51662
 F test/insert5.test 394f96728d1258f406fe5f5aeb0aaf29487c39a6
 F test/insertfault.test ac63d14ea3b49c573673a572f4014b9117383a03e497c58f308b5c776e4a7f74
 F test/instr.test 107df2b9b74a4b59315916b575590a08f2a714de0754abe541f10a0971d0a2a4
@@ -1101,7 +1101,7 @@ F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd
 F test/ioerr4.test f130fe9e71008577b342b8874d52984bd04ede2c
 F test/ioerr5.test 2edfa4fb0f896f733071303b42224df8bedd9da4
 F test/ioerr6.test a395a6ab144b26a9e3e21059a1ab6a7149cca65b
-F test/istrue.test 06f92ea38750fa74df7dbbe6920205251c2310861fbbe23a3adfa918a2e2ba74
+F test/istrue.test 9619a2d77580f676048aaff7a16a0bcfea2b96c6c660dfaded2e53c873418899
 F test/join.test bca044589e94bb466e4c1e91fb6fecdc3f3326ca6b3f590f555f1958156eb321
 F test/join2.test 21fc30e54ab35ed66bf51b89cec18729205497f5cc43c83bc042f96a73721593
 F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
@@ -1230,7 +1230,7 @@ F test/oserror.test 1fc9746b83d778e70d115049747ba19c7fba154afce7cc165b09feb6ca6a
 F test/ossfuzz.c 9636dad2092a05a32110df0ca06713038dd0c43dd89a77dabe4b8b0d71096715
 F test/ossshell.c f125c5bd16e537a2549aa579b328dd1c59905e7ab1338dfc210e755bb7b69f17
 F test/ovfl.test 199c482696defceacee8c8e0e0ef36da62726b2f
-F test/pager1.test 4fba160bf450cea19f6bf1d6483ef467545bac6405570e176c83c2c4b5d6d0d5
+F test/pager1.test 293c7ad1f19a07e548179b97534c6588249d4e40058b378ea26e75cc84d936f5
 F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
 F test/pager3.test 4e9a83d6ca0838d7c602c9eb93d1357562d9059c1e02ffb138a8271020838370
 F test/pager4.test a122e9e6925d5b23b31e3dfef8c6a44bbf19590e
@@ -1262,7 +1262,7 @@ F test/quick.test 1681febc928d686362d50057c642f77a02c62e57
 F test/quota-glob.test 32901e9eed6705d68ca3faee2a06b73b57cb3c26
 F test/quota.test bfb269ce81ea52f593f9648316cd5013d766dd2a
 F test/quota2.test 7dc12e08b11cbc4c16c9ba2aa2e040ea8d8ab4b8
-F test/quote.test 626149eda89ee64d81a3790de370f9f0211921b11568a49c28c861f394330508
+F test/quote.test 3f9238ab0e1db70dea89af9afa5859dbd759b0ce0a63da67d547553e2c316475
 F test/randexpr1.tcl 40dec52119ed3a2b8b2a773bce24b63a3a746459
 F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df
 F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736
@@ -1763,9 +1763,9 @@ F test/with2.test e0030e2f0267a910d6c0e4f46f2dfe941c1cc0d4f659ba69b3597728e7e8f1
 F test/with3.test 13b3336739da648a9e4dfa11bb04e73a920c97620041007c5f75d5d14084c346
 F test/with4.test 257be66c0c67fee1defbbac0f685c3465e2cad037f21ce65f23f86084f198205
 F test/withM.test 693b61765f2b387b5e3e24a4536e2e82de15ff64
-F test/without_rowid1.test 9cfb83705c506e3849fa7efc88a3c9a15f9a50bf9b1516b41757a7cef9bba8c3
+F test/without_rowid1.test e4034c0849ccc2e8bb749c69f15bd69bb9fcf8fe77e8d17ce02369604242fe83
 F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99
-F test/without_rowid3.test 96426a6c9a2a5cf62bbe55ea1ad038eaaf4bf743f40a1ad517233b8e5a3d4339
+F test/without_rowid3.test 39ab0dd773eaa62e59b17093f875327630f54c4145458f6d2b053d68d4b2f67b
 F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a
 F test/without_rowid5.test 89b1c587bd92a0590e440da33e7666bf4891572a
 F test/without_rowid6.test 8463b20098e9f75a501a9f17dfb42fffc79068eac0b2775fe56ef2281d2df45e
@@ -1879,7 +1879,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P f7f13cb1bc699c034a3f5f7a2431c8055cb79e2a14d5e70e1fc5dd6dec00fb26
-R 8121e5cf7bd833473b2f967ba76c7018
+P aafb7a21041090e529491b0ce30c3902420be0551b1b2c55840a5fbb9105fb7d
+R defd5bcc88d7bea7e7e35dc7f6baddf6
 U drh
-Z 55de9e911e5f0e6470b6e0d616339b8e
+Z 54c7264672e91f2f8c6e93ebf30dc6e3
index 721b77cdcf0b3d297cfbd1e841912080557f3a15..192459b530f9046cf6548dc234d7eac6b4794007 100644 (file)
@@ -1 +1 @@
-aafb7a21041090e529491b0ce30c3902420be0551b1b2c55840a5fbb9105fb7d
\ No newline at end of file
+5ce34a955bb36d77edc9951cb7ac2ef9c876d7d3ff5852af682f558e248f428c
\ No newline at end of file
index d0086c3c0c8a22f4514dec4a9482ab8f12ccfb15..1597f8bc33bb13ee6ed937de30a775e5e29a2652 100644 (file)
@@ -1617,8 +1617,10 @@ primary_key_exit:
 ** Add a new CHECK constraint to the table currently under construction.
 */
 void sqlite3AddCheckConstraint(
-  Parse *pParse,    /* Parsing context */
-  Expr *pCheckExpr  /* The check expression */
+  Parse *pParse,      /* Parsing context */
+  Expr *pCheckExpr,   /* The check expression */
+  const char *zStart, /* Opening "(" */
+  const char *zEnd    /* Closing ")" */
 ){
 #ifndef SQLITE_OMIT_CHECK
   Table *pTab = pParse->pNewTable;
@@ -1629,6 +1631,13 @@ void sqlite3AddCheckConstraint(
     pTab->pCheck = sqlite3ExprListAppend(pParse, pTab->pCheck, pCheckExpr);
     if( pParse->constraintName.n ){
       sqlite3ExprListSetName(pParse, pTab->pCheck, &pParse->constraintName, 1);
+    }else{
+      Token t;
+      for(zStart++; sqlite3Isspace(zStart[0]); zStart++){}
+      while( sqlite3Isspace(zEnd[-1]) ){ zEnd--; }
+      t.z = zStart;
+      t.n = (int)(zEnd - t.z);
+      sqlite3ExprListSetName(pParse, pTab->pCheck, &t, 1);    
     }
   }else
 #endif
index 44e0b4f343ae9b86a90748d9b7ce505be9d86c24..c44d6563a4b2acea7cbb811d766ffc1779f2cbfb 100644 (file)
@@ -366,7 +366,7 @@ ccons ::= PRIMARY KEY sortorder(Z) onconf(R) autoinc(I).
                                  {sqlite3AddPrimaryKey(pParse,0,R,I,Z);}
 ccons ::= UNIQUE onconf(R).      {sqlite3CreateIndex(pParse,0,0,0,0,R,0,0,0,0,
                                    SQLITE_IDXTYPE_UNIQUE);}
-ccons ::= CHECK LP expr(X) RP.   {sqlite3AddCheckConstraint(pParse,X);}
+ccons ::= CHECK LP(A) expr(X) RP(B).  {sqlite3AddCheckConstraint(pParse,X,A.z,B.z);}
 ccons ::= REFERENCES nm(T) eidlist_opt(TA) refargs(R).
                                  {sqlite3CreateForeignKey(pParse,0,&T,TA,R);}
 ccons ::= defer_subclause(D).    {sqlite3DeferForeignKey(pParse,D);}
@@ -420,8 +420,8 @@ tcons ::= PRIMARY KEY LP sortlist(X) autoinc(I) RP onconf(R).
 tcons ::= UNIQUE LP sortlist(X) RP onconf(R).
                                  {sqlite3CreateIndex(pParse,0,0,0,X,R,0,0,0,0,
                                        SQLITE_IDXTYPE_UNIQUE);}
-tcons ::= CHECK LP expr(E) RP onconf.
-                                 {sqlite3AddCheckConstraint(pParse,E);}
+tcons ::= CHECK LP(A) expr(E) RP(B) onconf.
+                                 {sqlite3AddCheckConstraint(pParse,E,A.z,B.z);}
 tcons ::= FOREIGN KEY LP eidlist(FA) RP
           REFERENCES nm(T) eidlist_opt(TA) refargs(R) defer_subclause_opt(D). {
     sqlite3CreateForeignKey(pParse, FA, &T, TA, R);
index f2c4f63c0d20c5aa420efa22d51ceb5fcf473b6f..9afc287a5baf827ac3737090eae5da856579231f 100644 (file)
@@ -4184,7 +4184,7 @@ void sqlite3StartTable(Parse*,Token*,Token*,int,int,int,int);
 void sqlite3AddColumn(Parse*,Token*,Token*);
 void sqlite3AddNotNull(Parse*, int);
 void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int);
-void sqlite3AddCheckConstraint(Parse*, Expr*);
+void sqlite3AddCheckConstraint(Parse*, Expr*, const char*, const char*);
 void sqlite3AddDefaultValue(Parse*,Expr*,const char*,const char*);
 void sqlite3AddCollateType(Parse*, Token*);
 void sqlite3AddGenerated(Parse*,Expr*,Token*);
index d28006e38fdb12b0f9203ab01cf832d957bc6efa..94fe1d14e4b90e7af62d29219c1d2cd1553074ac 100644 (file)
@@ -40,7 +40,7 @@ do_test check-1.3 {
   catchsql {
     INSERT INTO t1 VALUES(6,7);
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: x<5}}
 do_test check-1.4 {
   execsql {
     SELECT * FROM t1;
@@ -50,7 +50,7 @@ do_test check-1.5 {
   catchsql {
     INSERT INTO t1 VALUES(4,3);
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: y>x}}
 do_test check-1.6 {
   execsql {
     SELECT * FROM t1;
@@ -87,7 +87,7 @@ do_test check-1.12 {
   catchsql {
     UPDATE t1 SET x=7 WHERE x==2
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: x<5}}
 do_test check-1.13 {
   execsql {
     SELECT * FROM t1;
@@ -97,7 +97,7 @@ do_test check-1.14 {
   catchsql {
     UPDATE t1 SET x=5 WHERE x==2
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: x<5}}
 do_test check-1.15 {
   execsql {
     SELECT * FROM t1;
@@ -186,7 +186,7 @@ do_test check-2.11 {
   catchsql {
     INSERT INTO t2b VALUES('xyzzy','hi',5);
   }
-} {1 {CHECK constraint failed: t2b}}
+} {1 {CHECK constraint failed: typeof(coalesce(x,0))=='integer'}}
 do_test check-2.12 {
   execsql {
     CREATE TABLE t2c(
@@ -271,7 +271,7 @@ do_test check-3.9 {
   catchsql {
     INSERT INTO t3 VALUES(111,222,333);
   }
-} {1 {CHECK constraint failed: t3}}
+} {1 {CHECK constraint failed: t3.x<25}}
 
 do_test check-4.1 {
   execsql {
@@ -313,7 +313,10 @@ do_test check-4.6 {
   catchsql {
     UPDATE t4 SET x=0, y=1;
   }
-} {1 {CHECK constraint failed: t4}}
+} {1 {CHECK constraint failed: x+y==11
+        OR x*y==12
+        OR x/y BETWEEN 5 AND 8
+        OR -x==y+10}}
 do_test check-4.7 {
   execsql {
     SELECT * FROM t4;
@@ -335,7 +338,10 @@ do_test check-4.9 {
   catchsql {
     UPDATE t4 SET x=0, y=2;
   }
-} {1 {CHECK constraint failed: t4}}
+} {1 {CHECK constraint failed: x+y==11
+        OR x*y==12
+        OR x/y BETWEEN 5 AND 8
+        OR -x==y+10}}
 ifcapable vacuum {
   do_test check_4.10 {
     catchsql {
@@ -386,7 +392,7 @@ do_test check-6.5 {
   catchsql {
     UPDATE OR FAIL t1 SET x=7-x, y=y+1;
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: x<5}}
 do_test check-6.6 {
   execsql {
     SELECT * FROM t1;
@@ -398,7 +404,7 @@ do_test check-6.7 {
     INSERT INTO t1 VALUES(1,30.0);
     INSERT OR ROLLBACK INTO t1 VALUES(8,40.0);
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: x<5}}
 do_test check-6.8 {
   catchsql {
     COMMIT;
@@ -417,7 +423,7 @@ do_test check-6.12 {
   catchsql {
     REPLACE INTO t1 VALUES(6,7);
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: x<5}}
 do_test check-6.13 {
   execsql {SELECT * FROM t1}
 } {3 12.0 2 20.0}
@@ -446,7 +452,7 @@ db func myfunc -deterministic myfunc
 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 {CHECK constraint failed: t6}}
+          {1 {CHECK constraint failed: myfunc(a)}}
 
 do_test 7.4 {
   sqlite3 db2 test.db
@@ -469,7 +475,7 @@ do_test 7.7 {
 do_test 7.8 {
   db2 func myfunc myfunc
   catchsql { INSERT INTO t6 VALUES(12) } db2
-} {1 {CHECK constraint failed: t6}}
+} {1 {CHECK constraint failed: myfunc(a)}}
 
 # 2013-08-02:  Silently ignore database name qualifiers in CHECK constraints.
 #
@@ -550,10 +556,10 @@ do_execsql_test 12.20 {
 } {}
 do_catchsql_test 12.21 {
   INSERT INTO t1(a) VALUES('xyz');
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: a<>+a}}
 do_catchsql_test 12.22 {
   INSERT INTO t1(a) VALUES(123);
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: a<>+a}}
 do_execsql_test 12.30 {
   DROP TABLE t1;
   CREATE TABLE t1(a TEXT, CHECK(NOT(a=+a)));
@@ -561,10 +567,10 @@ do_execsql_test 12.30 {
 } {}
 do_catchsql_test 12.31 {
   INSERT INTO t1(a) VALUES('xyz');
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: NOT(a=+a)}}
 do_catchsql_test 12.32 {
   INSERT INTO t1(a) VALUES(123);
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: NOT(a=+a)}}
 do_execsql_test 12.40 {
   DROP TABLE t1;
   CREATE TABLE t1(a TEXT, CHECK(NOT(a<>+a)));
@@ -585,7 +591,7 @@ do_execsql_test 12.60 {
 } {NULL}
 do_catchsql_test 12.61 {
   INSERT INTO t1(a) VALUES(456);
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: a NOT BETWEEN 0 AND +a}}
 do_execsql_test 12.70 {
   DROP TABLE t1;
   CREATE TABLE t1(a TEXT, CHECK(a BETWEEN +a AND 999999));
@@ -600,6 +606,6 @@ do_execsql_test 12.80 {
 } {NULL}
 do_catchsql_test 12.81 {
   INSERT INTO t1(a) VALUES(456);
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: a NOT BETWEEN +a AND 999999}}
 
 finish_test
index b86f86022be84bb925c670b1a9bd6d30e07c6ea5..e0d0c87ecedbaae9f16ea03fa370b20862c7bc73 100644 (file)
@@ -813,7 +813,7 @@ do_test conflict-13.1 {
   catchsql {
     REPLACE INTO t13 VALUES(2);
   }
-} {1 {CHECK constraint failed: t13}}
+} {1 {CHECK constraint failed: a!=2}}
 verify_ex_errcode conflict-13.1b SQLITE_CONSTRAINT_CHECK
 do_test conflict-13.2 {
   execsql {
index f33e01d582709fa584d919aa07487e8128a8dfde..96289d38cad3a4a834111fe3da1733dc7d089e06 100644 (file)
@@ -811,7 +811,7 @@ do_test conflict2-13.1 {
   catchsql {
     REPLACE INTO t13 VALUES(2);
   }
-} {1 {CHECK constraint failed: t13}}
+} {1 {CHECK constraint failed: a!=2}}
 verify_ex_errcode conflict2-13.1b SQLITE_CONSTRAINT_CHECK
 do_test conflict2-13.2 {
   execsql {
index 820420ccf50027eac216493b9132ae28b2eb3732..30a475737815a99258d350074d8ac10662818c44 100644 (file)
@@ -36,7 +36,7 @@ do_execsql_test date2-120 {
 } {2017-07-20 one}
 do_catchsql_test date2-130 {
   INSERT INTO t1(x,y) VALUES('2017-08-01','two');
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: date(x) BETWEEN '2017-07-01' AND '2017-07-31'}}
 
 do_execsql_test date2-200 {
   CREATE TABLE t2(x,y);
@@ -138,7 +138,7 @@ do_catchsql_test date2-601 {
 } {0 {}}
 do_catchsql_test date2-602 {
   INSERT INTO t601(a,b) VALUES(1e100, '1970-01-01');
-} {1 {CHECK constraint failed: t601}}
+} {1 {CHECK constraint failed: a<julianday(b)}}
 do_catchsql_test date2-603 {
   INSERT INTO t601(a,b) VALUES(10, 'now');
 } {1 {non-deterministic use of julianday() in a CHECK constraint}}
index c9742eaee305b42862cb03ba99d0d5831b2917dc..e83e5cca1c0dc2371c96996d76cb9b9a4e7b2475 100644 (file)
@@ -1433,20 +1433,20 @@ do_execsql_test 4.11 {
 }
 
 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}
+  1a    "INSERT INTO x1 VALUES('one', 0)"       {b>0}
+  1b    "INSERT INTO t1 VALUES('one', -4.0)"    {b>0}
 
-  2a    "INSERT INTO x2 VALUES('abc', 1)"       {x2}
-  2b    "INSERT INTO t2 VALUES('abc', 1)"       {t2}
+  2a    "INSERT INTO x2 VALUES('abc', 1)"       {a||b}
+  2b    "INSERT INTO t2 VALUES('abc', 1)"       {a||b}
 
-  3a    "INSERT INTO x2 VALUES(0, 'abc')"       {x2}
-  3b    "INSERT INTO t2 VALUES(0, 'abc')"       {t2}
+  3a    "INSERT INTO x2 VALUES(0, 'abc')"       {a||b}
+  3b    "INSERT INTO t2 VALUES(0, 'abc')"       {a||b}
 
-  4a    "UPDATE t1 SET b=-1 WHERE rowid=1"      {t1}
-  4b    "UPDATE x1 SET b=-1 WHERE rowid=1"      {x1}
+  4a    "UPDATE t1 SET b=-1 WHERE rowid=1"      {b>0}
+  4b    "UPDATE x1 SET b=-1 WHERE rowid=1"      {b>0}
 
-  4a    "UPDATE x2 SET a='' WHERE rowid=1"      {x2}
-  4b    "UPDATE t2 SET a='' WHERE rowid=1"      {t2}
+  4a    "UPDATE x2 SET a='' WHERE rowid=1"      {a||b}
+  4b    "UPDATE t2 SET a='' WHERE rowid=1"      {a||b}
 }
 
 # EVIDENCE-OF: R-34109-39108 If the CHECK expression evaluates to NULL,
@@ -1639,7 +1639,7 @@ do_execsql_test 4.18.1 {
 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 {CHECK constraint failed: t4}}
+} {1 {CHECK constraint failed: b!=10}}
 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}
 
index 015c43cbd37a4dafe04e00015cd7f322637c4949..6f9bdc2b7c929eeb167f435569a3299426e67358 100644 (file)
@@ -417,14 +417,14 @@ do_test fkey2-3.1.2 {
 } {}
 do_test fkey2-3.1.3 {
   catchsql { UPDATE ab SET a = 5 }
-} {1 {CHECK constraint failed: ef}}
+} {1 {CHECK constraint failed: e!=5}}
 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 {CHECK constraint failed: ef}}
+} {1 {CHECK constraint failed: e!=5}}
 do_test fkey2-3.1.5 {
   execsql COMMIT;
   execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }
index fe7d042c27d0279b478e26170d21f6379ccc22b2..924c1fa5389841398f2692c19e50a7894019e3fc 100644 (file)
@@ -381,32 +381,32 @@ ifcapable check {
     catchsql {
       INSERT INTO t1 (x) VALUES (NULL);
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.3 {
     catchsql {
       INSERT INTO t1 (x) VALUES (NULL);
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.4 {
     catchsql {
       INSERT INTO t1 (x) VALUES ('');
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.5 {
     catchsql {
       INSERT INTO t1 (x) VALUES ('bad');
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.6 {
     catchsql {
       INSERT INTO t1 (x) VALUES ('1234bad');
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.7 {
     catchsql {
       INSERT INTO t1 (x) VALUES ('1234.56bad');
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.8 {
     catchsql {
       INSERT INTO t1 (x) VALUES (1234);
@@ -416,7 +416,7 @@ ifcapable check {
     catchsql {
       INSERT INTO t1 (x) VALUES (1234.56);
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.10 {
     catchsql {
       INSERT INTO t1 (x) VALUES ('1234');
@@ -426,27 +426,27 @@ ifcapable check {
     catchsql {
       INSERT INTO t1 (x) VALUES ('1234.56');
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.12 {
     catchsql {
       INSERT INTO t1 (x) VALUES (ZEROBLOB(4));
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.13 {
     catchsql {
       INSERT INTO t1 (x) VALUES (X'');
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.14 {
     catchsql {
       INSERT INTO t1 (x) VALUES (X'1234');
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.15 {
     catchsql {
       INSERT INTO t1 (x) VALUES (X'12345678');
     }
-  } {1 {CHECK constraint failed: t1}}
+  } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   do_test func4-3.16 {
     catchsql {
       INSERT INTO t1 (x) VALUES ('1234.00');
@@ -467,7 +467,7 @@ ifcapable check {
       catchsql {
         INSERT INTO t1 (x) VALUES (9223372036854775808);
       }
-    } {1 {CHECK constraint failed: t1}}
+    } {1 {CHECK constraint failed: tointeger(x) IS NOT NULL}}
   }
   do_execsql_test func4-3.20 {
     SELECT x FROM t1 WHERE x>0 ORDER BY x;
@@ -483,32 +483,32 @@ ifcapable check {
       catchsql {
         INSERT INTO t2 (x) VALUES (NULL);
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.3 {
       catchsql {
         INSERT INTO t2 (x) VALUES (NULL);
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.4 {
       catchsql {
         INSERT INTO t2 (x) VALUES ('');
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.5 {
       catchsql {
         INSERT INTO t2 (x) VALUES ('bad');
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.6 {
       catchsql {
         INSERT INTO t2 (x) VALUES ('1234bad');
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.7 {
       catchsql {
         INSERT INTO t2 (x) VALUES ('1234.56bad');
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.8 {
       catchsql {
         INSERT INTO t2 (x) VALUES (1234);
@@ -533,22 +533,22 @@ ifcapable check {
       catchsql {
         INSERT INTO t2 (x) VALUES (ZEROBLOB(4));
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.13 {
       catchsql {
         INSERT INTO t2 (x) VALUES (X'');
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.14 {
       catchsql {
         INSERT INTO t2 (x) VALUES (X'1234');
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_test func4-4.15 {
       catchsql {
         INSERT INTO t2 (x) VALUES (X'12345678');
       }
-    } {1 {CHECK constraint failed: t2}}
+    } {1 {CHECK constraint failed: toreal(x) IS NOT NULL}}
     do_execsql_test func4-4.16 {
       SELECT x FROM t2 ORDER BY x;
     } {1234.0 1234.0 1234.56 1234.56}
index f09c52f9f71b564c6d5ed6242efbd025ec37608e..efbfbd0379245f4967868f030f64fac7a2d92a62 100644 (file)
@@ -332,7 +332,7 @@ do_test in-10.2 {
   catchsql {
     INSERT INTO t5 VALUES(4);
   }
-} {1 {CHECK constraint failed: t5}}
+} {1 {CHECK constraint failed: a IN (111,222,333)}}
 
 # Ticket #1821
 #
index 4c6a6d4a6ceb015d23efde450e1539c204f9173d..3eca60a84d0347cb9bc014003ab59c57b9d03dc8 100644 (file)
@@ -55,7 +55,7 @@ do_test insert4-1.1 {
   catchsql {
     INSERT INTO t1 SELECT * FROM t2;
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: b>a}}
 xferopt_test insert4-1.2 0
 do_test insert4-1.3 {
   execsql {
@@ -102,7 +102,7 @@ do_test insert4-2.3.3 {
     INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
     SELECT * FROM t1;
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: b>a}}
 xferopt_test insert4-2.3.4 0
 
 # Do not run the transfer optimization if there is a DISTINCT
@@ -120,7 +120,7 @@ do_test insert4-2.4.3 {
     DELETE FROM t1;
     INSERT INTO t1 SELECT DISTINCT * FROM t2;
   }
-} {1 {CHECK constraint failed: t1}}
+} {1 {CHECK constraint failed: b>a}}
 xferopt_test insert4-2.4.4 0
 
 # The following procedure constructs two tables then tries to transfer
@@ -316,7 +316,7 @@ do_test insert4-6.6 {
   catchsql {
     INSERT INTO t6b SELECT * FROM t6a;
   }
-} {1 {CHECK constraint failed: t6b}}
+} {1 {CHECK constraint failed: x<>'abc' COLLATE nocase}}
 do_test insert4-6.7 {
   execsql {
     DROP TABLE t6b;
@@ -325,7 +325,7 @@ do_test insert4-6.7 {
   catchsql {
     INSERT INTO t6b SELECT * FROM t6a;
   }
-} {1 {CHECK constraint failed: t6b}}
+} {1 {CHECK constraint failed: x COLLATE nocase <>'abc'}}
 
 # Ticket [6284df89debdfa61db8073e062908af0c9b6118e]
 # Disable the xfer optimization if the destination table contains
index b2f5b8d22b99579872544162cd17d5ba08a8c2d8..13eccabc25870df2c1477637b4e941df3b9adac1 100644 (file)
@@ -112,16 +112,16 @@ do_execsql_test istrue-520 {
 } {1 1 0 {} {}}
 do_catchsql_test istrue-521 {
   INSERT INTO t2 VALUES(2,false,false,null,null);
-} {1 {CHECK constraint failed: t2}}
+} {1 {CHECK constraint failed: b IS TRUE}}
 do_catchsql_test istrue-522 {
   INSERT INTO t2 VALUES(2,true,true,null,null);
-} {1 {CHECK constraint failed: t2}}
+} {1 {CHECK constraint failed: c IS FALSE}}
 do_catchsql_test istrue-523 {
   INSERT INTO t2 VALUES(2,true,false,true,null);
-} {1 {CHECK constraint failed: t2}}
+} {1 {CHECK constraint failed: d IS NOT TRUE}}
 do_catchsql_test istrue-524 {
   INSERT INTO t2 VALUES(2,true,false,null,false);
-} {1 {CHECK constraint failed: t2}}
+} {1 {CHECK constraint failed: e IS NOT FALSE}}
 
 foreach {tn val} [list 1 NaN 2 -NaN 3 NaN0 4 -NaN0 5 Inf 6 -Inf] {
   do_execsql_test istrue-600.$tn.1 {
@@ -193,7 +193,7 @@ do_execsql_test istrue-840 {
 } {}
 do_catchsql_test istrue-841 {
   INSERT INTO False VALUES(5,6,7);
-} {1 {CHECK constraint failed: false}}
+} {1 {CHECK constraint failed: 5 IN (false.false)}}
 do_execsql_test istrue-850 {
   SELECT 9 IN (false.false) FROM false;
 } {0}
index 20fd8bd17abaf28864d82a590d8c2cf65fc2cc91..5c3f7a8ea35305145c8dd867ab767fcf4581ba39 100644 (file)
@@ -276,7 +276,7 @@ do_execsql_test pager1-3.1.2 {
 } {3 0}
 do_catchsql_test pager1-3.1.3 {
     INSERT INTO t1 SELECT a+3, randomblob(1500) FROM t1
-} {1 {CHECK constraint failed: counter}}
+} {1 {CHECK constraint failed: i<5}}
 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 } {}
index a7477087c0536b8cff4d04bdd3ae27b97c8b9c1a..553e96a0b6f79567450976b0de33417c6186598f 100644 (file)
@@ -122,7 +122,7 @@ do_execsql_test 2.3.1 {
 }
 do_catchsql_test 2.3.2 {
   INSERT INTO xyz VALUES(1, 2, 'null');
-} {1 {CHECK constraint failed: xyz}}
+} {1 {CHECK constraint failed: c!="null"}}
 
 do_execsql_test 2.4 {
   INSERT INTO t1 VALUES(1, 2, 3);
index 3497ca0cccf690bdb24729094cd34da5a968076b..02a089610d4755752d2b4b7deda6a6c0d2cb21d2 100644 (file)
@@ -341,7 +341,7 @@ do_execsql_test 7.1 {
 } {}
 do_catchsql_test 7.2 {
   INSERT INTO t70a(rowid,a,b) VALUES(33,99,'xyzzy');
-} {1 {CHECK constraint failed: t70a}}
+} {1 {CHECK constraint failed: rowid!=33}}
 do_catchsql_test 7.3 {
   CREATE TABLE t70b(
      a INT CHECK( rowid!=33 ),
index eae7e3c856a5ea335fcd5c14b3d8ccd2a5b33b50..f7687455ec543d22818e19aaac433d5b18dffa8a 100644 (file)
@@ -417,14 +417,14 @@ do_test without_rowid3-3.1.2 {
 } {}
 do_test without_rowid3-3.1.3 {
   catchsql { UPDATE ab SET a = 5 }
-} {1 {CHECK constraint failed: ef}}
+} {1 {CHECK constraint failed: e!=5}}
 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 {CHECK constraint failed: ef}}
+} {1 {CHECK constraint failed: e!=5}}
 do_test without_rowid3-3.1.5 {
   execsql COMMIT;
   execsql { SELECT * FROM ab; SELECT * FROM cd; SELECT * FROM ef }