From: drh <> Date: Tue, 8 Aug 2023 17:36:03 +0000 (+0000) Subject: Minor cleanups in sqlite3Int.h. By reordering some fields in the Parse X-Git-Tag: version-3.43.0~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80c438613a687d41ce820f113a2b20e1aade93a6;p=thirdparty%2Fsqlite.git Minor cleanups in sqlite3Int.h. By reordering some fields in the Parse object, it packs more tightly and uses less memory and less CPU to initialize. FossilOrigin-Name: aa6de539c09faa320b68c63659e602107145c4263fa680d5b40fe4d7d7ac4534 --- diff --git a/manifest b/manifest index 771b3d5cc1..26ed34f8d1 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\san\sissue\sin\sthe\samalgamation\sgenerator\sin\swhich\sit\swas\snot\scorrectly\nexpanding\sthe\sSQLite\sversion\sin\sthe\sheader\scomment. -D 2023-08-08T16:53:12.113 +C Minor\scleanups\sin\ssqlite3Int.h.\s\sBy\sreordering\ssome\sfields\sin\sthe\sParse\nobject,\sit\spacks\smore\stightly\sand\suses\sless\smemory\sand\sless\sCPU\sto\ninitialize. +D 2023-08-08T17:36:03.881 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -649,7 +649,7 @@ F src/shell.c.in 694aaf751f00610381533d4a31c83d142cfc83ef91ef65e2aa6912ace7c39b4 F src/sqlite.h.in 7b07a33d2af82ee974aa91e6294abce0282b2f4c5934b291d2fff961810dd867 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h da473ce2b3d0ae407a6300c4a164589b9a6bfdbec9462688a8593ff16f3bb6e4 -F src/sqliteInt.h bdf30ea8552626736f7fc2d216beb4e6ee556d1afc39d20afa1697ea259463ca +F src/sqliteInt.h 025ed58a41968ef80d64cdc194caa8dd207b0256b147253d762fdac7a62408f9 F src/sqliteLimit.h 33b1c9baba578d34efe7dfdb43193b366111cdf41476b1e82699e14c11ee1fb6 F src/status.c 160c445d7d28c984a0eae38c144f6419311ed3eace59b44ac6dafc20db4af749 F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1 @@ -2050,8 +2050,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 27ff86e4d8d251dbbcc9f0682d3d7b040518cbeee891cfe253661d1fdbec4e4f -R c20236f0402451a8637d8162cefac63e +P 293f6191e9b328cb8a8d3fff0f7bd5a6f5390b5ff090497a170c791b6ea22917 +R 13de6fab3751f215b8cb399b0a8433e9 U drh -Z 866595e1403d7c5e711a1be0d84c07b9 +Z 9646a5d58abf6d956e75b2b4249fce92 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index fb6b8fe7f1..a11170fc8e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -293f6191e9b328cb8a8d3fff0f7bd5a6f5390b5ff090497a170c791b6ea22917 \ No newline at end of file +aa6de539c09faa320b68c63659e602107145c4263fa680d5b40fe4d7d7ac4534 \ No newline at end of file diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 0e029ddcee..c2a9f855a7 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -894,7 +894,7 @@ typedef INT16_TYPE LogEst; /* ** P is one byte past the end of a large buffer. Return true if a span of bytes ** between S..E crosses the end of that buffer. In other words, return true -** if the sub-buffer S..E-1 overflows the buffer show last byte is P-1. +** if the sub-buffer S..E-1 overflows the buffer whose last byte is P-1. ** ** S is the start of the span. E is one byte past the end of end of span. ** @@ -1257,7 +1257,6 @@ typedef struct Cte Cte; typedef struct CteUse CteUse; typedef struct Db Db; typedef struct DbFixer DbFixer; -typedef struct DblDbl DblDbl; typedef struct Schema Schema; typedef struct Expr Expr; typedef struct ExprList ExprList; @@ -3778,6 +3777,9 @@ struct Parse { int regRoot; /* Register holding root page number for new objects */ int nMaxArg; /* Max args passed to user function by sub-program */ int nSelect; /* Number of SELECT stmts. Counter for Select.selId */ +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK + u32 nProgressSteps; /* xProgress steps taken during sqlite3_prepare() */ +#endif #ifndef SQLITE_OMIT_SHARED_CACHE int nTableLock; /* Number of locks in aTableLock */ TableLock *aTableLock; /* Required table locks for shared-cache mode */ @@ -3791,12 +3793,9 @@ struct Parse { int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */ Returning *pReturning; /* The RETURNING clause */ } u1; - LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u32 oldmask; /* Mask of old.* columns referenced */ u32 newmask; /* Mask of new.* columns referenced */ -#ifndef SQLITE_OMIT_PROGRESS_CALLBACK - u32 nProgressSteps; /* xProgress steps taken during sqlite3_prepare() */ -#endif + LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ u8 bReturning; /* Coding a RETURNING trigger */ u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */