]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a couple of problems with test scripts and SQLITE_OMIT_ALTERTABLE builds.
authordan <Dan Kennedy>
Fri, 5 Nov 2021 10:43:14 +0000 (10:43 +0000)
committerdan <Dan Kennedy>
Fri, 5 Nov 2021 10:43:14 +0000 (10:43 +0000)
FossilOrigin-Name: 3ab5414d337536acad5675a3f1ca10e1ca925f0e7182def604b8b7a8fb53bf5a

manifest
manifest.uuid
test/e_fkey.test
test/strict1.test

index d4c53b4654ef29315f5236a1839c983dff5701c0..7c9de832acff23d2eef1f3b88a13aa8ed3805ad5 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\scrash\sthat\scould\soccur\sin\sfts3\swhen\sprocessing\sa\scorrupt\sdatabase.
-D 2021-11-04T18:04:55.373
+C Fix\sa\scouple\sof\sproblems\swith\stest\sscripts\sand\sSQLITE_OMIT_ALTERTABLE\sbuilds.
+D 2021-11-05T10:43:14.088
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -865,7 +865,7 @@ F test/e_delete.test ab39084f26ae1f033c940b70ebdbbd523dc4962e
 F test/e_droptrigger.test 235c610f8bf8ec44513e222b9085c7e49fad65ad0c1975ac2577109dd06fd8fa
 F test/e_dropview.test 74e405df7fa0f762e0c9445b166fe03955856532e2bb234c372f7c51228d75e7
 F test/e_expr.test e164550b9f8fd9c130283d1eae692dff9e2ba67f4dbd35f7325021f5d4b8851c
-F test/e_fkey.test 351c7b989e5aefcc339ef5fc78dc4738442bd247a392cd67d81c2881000c369e
+F test/e_fkey.test ee321dbca3c53204da46cb40b8ec80192e995035f9ea26576ddcd842b1f0877f
 F test/e_fts3.test 17ba7c373aba4d4f5696ba147ee23fd1a1ef70782af050e03e262ca187c5ee07
 F test/e_insert.test f02f7f17852b2163732c6611d193f84fc67bc641fb4882c77a464076e5eba80e
 F test/e_reindex.test 2b0e29344497d9a8a999453a003cb476b6b1d2eef2d6c120f83c2d3a429f3164
@@ -1431,7 +1431,7 @@ F test/stat.test 15a3106eddedfc882f64bc09f237b4169be4b92dd57c93031b8ff8b13af3e7c
 F test/statfault.test 55f86055f9cd7b2d962a621b8a04215c1cebd4eaaecde92d279442327fe648a0
 F test/stmt.test 54ed2cc0764bf3e48a058331813c3dbd19fc1d0827c3d8369914a5d8f564ec75
 F test/stmtvtab1.test 6873dfb24f8e79cbb5b799b95c2e4349060eb7a3b811982749a84b359468e2d5
-F test/strict1.test b13473c6f61a1744806969f841c4a1872081f2114de7145f04e4def42be154d0
+F test/strict1.test a3ec495471f24c1a6e1a1664bd23e24ccdb27ae93b1a763ee1942ec955b68e71
 F test/strict2.test b22c7a98b5000aef937f1990776497f0e979b1a23bc4f63e2d53b00e59b20070
 F test/subjournal.test 8d4e2572c0ee9a15549f0d8e40863161295107e52f07a3e8012a2e1fdd093c49
 F test/subquery.test d7268d193dd33d5505df965399d3a594e76ae13f
@@ -1930,7 +1930,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 f60e05bdbabe0449e5a12275b254ca9da39a2a5fdbff078ce28007a23044749e
-R 423ea157103420c3d5933c27e5854a87
+P 2fad2a89527757b3956538a6bf91ebebe9c483f22f94e889e8b50c58f5100c5c
+R b61948e5ebb227c64278c60c06073f16
 U dan
-Z d7a21be88a25d76521d53071a08bf764
+Z c466bc44461f7c44de2cd00615a82a91
index 9d37fc47dee002a3444d9f81529f19fefec42aa7..a488a84a47d3269626b0e6681d4fbdfe9c60fdac 100644 (file)
@@ -1 +1 @@
-2fad2a89527757b3956538a6bf91ebebe9c483f22f94e889e8b50c58f5100c5c
\ No newline at end of file
+3ab5414d337536acad5675a3f1ca10e1ca925f0e7182def604b8b7a8fb53bf5a
\ No newline at end of file
index e5eb0d49c17d5bfd81258e8ca7935457527c833c..ab3c29033bfc7a945b58c902ab7a137dd593b423 100644 (file)
@@ -2513,9 +2513,11 @@ proc test_efkey_6 {tn zAlter isError} {
 
 }
 
-test_efkey_6 1 "ALTER TABLE tbl ADD COLUMN c REFERENCES xx" 0
-test_efkey_6 2 "ALTER TABLE tbl ADD COLUMN c DEFAULT NULL REFERENCES xx" 0
-test_efkey_6 3 "ALTER TABLE tbl ADD COLUMN c DEFAULT 0 REFERENCES xx" 1
+ifcapable altertable {
+  test_efkey_6 1 "ALTER TABLE tbl ADD COLUMN c REFERENCES xx" 0
+  test_efkey_6 2 "ALTER TABLE tbl ADD COLUMN c DEFAULT NULL REFERENCES xx" 0
+  test_efkey_6 3 "ALTER TABLE tbl ADD COLUMN c DEFAULT 0 REFERENCES xx" 1
+}
 
 #-------------------------------------------------------------------------
 # Test that ALTER TABLE adjusts REFERENCES clauses when the parent table
@@ -2532,6 +2534,7 @@ test_efkey_6 3 "ALTER TABLE tbl ADD COLUMN c DEFAULT 0 REFERENCES xx" 1
 # statement or statements stored in the sqlite_schema table are modified
 # to reflect the new parent table name.
 #
+ifcapable altertable {
 do_test e_fkey-56.1 {
   drop_all_tables
   execsql {
@@ -2569,6 +2572,7 @@ do_test e_fkey-56.4 {
   {CREATE TABLE c2(e, f, FOREIGN KEY(f) REFERENCES "p" ON UPDATE CASCADE)}  \
   {CREATE TABLE c3(e, 'f col 2', FOREIGN KEY('f col 2') REFERENCES "p" ON UPDATE CASCADE)} \
 ]
+}
 
 #-------------------------------------------------------------------------
 # Check that a DROP TABLE does an implicit DELETE FROM. Which does not
@@ -2769,6 +2773,7 @@ do_test e_fkey-60.6 {
 # EVIDENCE-OF: R-54142-41346 The properties of the DROP TABLE and ALTER
 # TABLE commands described above only apply if foreign keys are enabled.
 #
+ifcapable altertable {
 do_test e_fkey-61.1.1 {
   drop_all_tables
   execsql { CREATE TABLE t1(a, b) ; INSERT INTO t1 VALUES(1, 2) }
@@ -2830,6 +2835,7 @@ do_test e_fkey-61.3.2 {
 do_test e_fkey-61.3.3 {
   execsql { PRAGMA foreign_keys = ON }
 } {}
+}
 
 ###########################################################################
 ### SECTION 6: Limits and Unsupported Features
index 0ffcc6f8c4c1f9b7cf1ca266bfd790a3ae9e297e..67483413fab92f33f69aa3caca4d6335cbe8595c 100644 (file)
@@ -116,21 +116,23 @@ do_catchsql_test strict1-6.3 {
   INSERT INTO t1(e) VALUES(x'3456');
 } {1 {cannot store BLOB value in REAL column t1.e}}
 
-do_execsql_test strict1-7.1 {
-  DROP TABLE IF EXISTS t4;
-  CREATE TABLE t4(
-    a INT AS (b*2) VIRTUAL,
-    b INT AS (c*2) STORED,
-    c INT PRIMARY KEY
-  ) STRICT;
-  INSERT INTO t4(c) VALUES(1);
-  SELECT * FROM t4;
-} {4 2 1}
-do_catchsql_test strict-7.2 {
-  ALTER TABLE t4 ADD COLUMN d VARCHAR;
-} {1 {error in table t4 after add column: unknown datatype for t4.d: "VARCHAR"}}
-do_catchsql_test strict-7.3 {
-  ALTER TABLE t4 ADD COLUMN d;
-} {1 {error in table t4 after add column: missing datatype for t4.d}}
+ifcapable altertable {
+  do_execsql_test strict1-7.1 {
+    DROP TABLE IF EXISTS t4;
+    CREATE TABLE t4(
+      a INT AS (b*2) VIRTUAL,
+      b INT AS (c*2) STORED,
+      c INT PRIMARY KEY
+    ) STRICT;
+    INSERT INTO t4(c) VALUES(1);
+    SELECT * FROM t4;
+  } {4 2 1}
+  do_catchsql_test strict1-7.2 {
+    ALTER TABLE t4 ADD COLUMN d VARCHAR;
+  } {1 {error in table t4 after add column: unknown datatype for t4.d: "VARCHAR"}}
+  do_catchsql_test strict1-7.3 {
+    ALTER TABLE t4 ADD COLUMN d;
+  } {1 {error in table t4 after add column: missing datatype for t4.d}}
+}
 
 finish_test