]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Performance optimization and slight size reduction in the OP_Transaction
authordrh <>
Sun, 3 Apr 2022 10:42:06 +0000 (10:42 +0000)
committerdrh <>
Sun, 3 Apr 2022 10:42:06 +0000 (10:42 +0000)
opcode.

FossilOrigin-Name: 7bee8c195f3fc27aaab13e493ad446a4f19201de3ac064ed6d8a3cbda7c69ee1

manifest
manifest.uuid
src/vdbe.c

index f05cad7f4058019b292e73ded19f6d1e5d280ea9..01d4999df495a17df6ceb9cb4fb29c608337096a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Expand\sthe\sgetVarint32()\smacro\sin\sa\sfew\splaces,\sas\sthe\sC-compiler\sseems\sto\nbe\sable\sto\soptimize\sbetter\swhen\sthat\smacro\sis\sexpanded\smanually.
-D 2022-04-02T22:47:47.656
+C Performance\soptimization\sand\sslight\ssize\sreduction\sin\sthe\sOP_Transaction\nopcode.
+D 2022-04-03T10:42:06.846
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -624,7 +624,7 @@ F src/upsert.c 8789047a8f0a601ea42fa0256d1ba3190c13746b6ba940fe2d25643a7e991937
 F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
 F src/util.c 602fe229f32a96ceccae4f40824129669582096f7c355f53dbac156c9fecef23
 F src/vacuum.c 6c38ddc52f0619865c91dae9c441d4d48bf3040d7dc1bc5b22da1e45547ed0b3
-F src/vdbe.c 52b9afb8df338c7a392332ecfe71c748817b72abfcc1bb90c61d10264aa6db53
+F src/vdbe.c 17c49fe3d853ca458dbf681ea462f8095b4cab86beaca57be3483f8aa0394ca4
 F src/vdbe.h a1d0e3b934e835e73edd146f2e7c4eadb711b5c9875c18159a57483fd78e550e
 F src/vdbeInt.h 88c11169ac35488764e6275017610ddbaaa0e51acd260ea61638f9ccce578d7c
 F src/vdbeapi.c 5c498998c99667f16cac2519f2fa439fe46acf99a332b0caa73637fc2ab35c22
@@ -1945,8 +1945,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 8a3a3486358d076c34e515ac92663a04f0c7ff10f405094cb5b6ada0d5f05cdc
-R a6b1bae040909e67200132c66e5ed3d0
+P cd4fe34b98bf5ce26f3596c717edb73932f3b46ad6e9b4934d06b7b3c176a0d6
+R cceae0bcc38787bdf816e721690684a9
 U drh
-Z b06751a34dfdacfa9d4b7d6e9de9abea
+Z 9618a426f045ebdd433022eacdc71e54
 # Remove this line to create a well-formed Fossil manifest.
index 364727c8d117534974a408eccb2773ec2b52dc41..9a3bb1ac2344b1dec85b78882aa506d3099ed8f2 100644 (file)
@@ -1 +1 @@
-cd4fe34b98bf5ce26f3596c717edb73932f3b46ad6e9b4934d06b7b3c176a0d6
\ No newline at end of file
+7bee8c195f3fc27aaab13e493ad446a4f19201de3ac064ed6d8a3cbda7c69ee1
\ No newline at end of file
index bb23757d69720159de7a40039a843e6412415edd..4c7a3a72c83a2e28aa19d95b8450e699fdd22115 100644 (file)
@@ -3754,6 +3754,7 @@ case OP_AutoCommit: {
 */
 case OP_Transaction: {
   Btree *pBt;
+  Db *pDb;
   int iMeta = 0;
 
   assert( p->bIsReader );
@@ -3773,7 +3774,8 @@ case OP_Transaction: {
     }
     goto abort_due_to_error;
   }
-  pBt = db->aDb[pOp->p1].pBt;
+  pDb = &db->aDb[pOp->p1];
+  pBt = pDb->pBt;
 
   if( pBt ){
     rc = sqlite3BtreeBeginTrans(pBt, pOp->p2, &iMeta);
@@ -3814,8 +3816,7 @@ case OP_Transaction: {
   assert( pOp->p5==0 || pOp->p4type==P4_INT32 );
   if( rc==SQLITE_OK
    && pOp->p5
-   && (iMeta!=pOp->p3
-      || db->aDb[pOp->p1].pSchema->iGeneration!=pOp->p4.i)
+   && (iMeta!=pOp->p3 || pDb->pSchema->iGeneration!=pOp->p4.i)
   ){
     /*
     ** IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema