]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Do not allow the xfer-optimization to move the content of an ordinary
authordrh <>
Fri, 20 Aug 2021 01:12:39 +0000 (01:12 +0000)
committerdrh <>
Fri, 20 Aug 2021 01:12:39 +0000 (01:12 +0000)
table into a strict table.

FossilOrigin-Name: 1ed1b594d3c03ced68eb2b1285dfd8b9641cda20db1b1b7ae1afee217a3a9fe2

manifest
manifest.uuid
src/insert.c

index faa664cdb0b474782fae5008806a3107963750ae..93d912786ee796b253cdf9bcb10799bcdd4c38d4 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Improved\scomments.\s\sFewer\sopcodes\sfor\sintegrity_check\son\sstrict\stables.
-D 2021-08-19T16:29:33.914
+C Do\snot\sallow\sthe\sxfer-optimization\sto\smove\sthe\scontent\sof\san\sordinary\ntable\sinto\sa\sstrict\stable.
+D 2021-08-20T01:12:39.171
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -505,7 +505,7 @@ F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
 F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
 F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
 F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
-F src/insert.c d2a3f90a4bdfb98c8f1dc30b6449e400acec689d731ec408324466342302232b
+F src/insert.c 16fa4b66709db6db5bb31475f2321d0a839269765aa2461a520c151c385e8b9d
 F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
 F src/loadext.c 0aa9e7f08e168e3874cb54984408e3976dafdf5616d511952c425b5ac088ea3e
 F src/main.c aab8cefb6bfbdbecc53fd19058fa053c0c5e591b2e5067d883ef999d019dcd29
@@ -1922,7 +1922,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 97c9248b3b81facce569bfa3fb405d44a1d1041e87132e8f649458c95620ccb2
-R f9caa21161816acea3d561e69ac639dc
+P 4ee57fb588b41ab76649c605f57c7bcf5b7b638435af458d69f69a8ccbb121e8
+R 7461fae7c9e91c53b266760ec73eefb6
 U drh
-Z 247f6cbc04db0661f0c32539094ce344
+Z f75e39c2709cda22cb0c40b7515a051c
index 9e6477632cfa7470e4be98d168994e88c8b04b01..8e02472d31e734b3fd43f9a2c8111a7f95332ac4 100644 (file)
@@ -1 +1 @@
-4ee57fb588b41ab76649c605f57c7bcf5b7b638435af458d69f69a8ccbb121e8
\ No newline at end of file
+1ed1b594d3c03ced68eb2b1285dfd8b9641cda20db1b1b7ae1afee217a3a9fe2
\ No newline at end of file
index 9617e54e7c1fde3a8a8e2bd807c041d5304107a0..acaafa0239efa2de8423325c57173aefef8d307b 100644 (file)
@@ -2837,6 +2837,9 @@ static int xferOptimization(
   if( pDest->iPKey!=pSrc->iPKey ){
     return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */
   }
+  if( (pDest->tabFlags & TF_Strict)!=0 && (pSrc->tabFlags & TF_Strict)==0 ){
+    return 0;   /* Cannot feed from a non-strict into a strict table */
+  }
   for(i=0; i<pDest->nCol; i++){
     Column *pDestCol = &pDest->aCol[i];
     Column *pSrcCol = &pSrc->aCol[i];