From: drh Date: Thu, 7 Jan 2016 17:09:43 +0000 (+0000) Subject: Small performance and size optimization spotted while working on the X-Git-Tag: version-3.11.0~180 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8549d55ead7e8bc5cb68b563bf3f7bfccd799dcf;p=thirdparty%2Fsqlite.git Small performance and size optimization spotted while working on the shared-cache problem. FossilOrigin-Name: 828958ff77a5c239d55302f570077835c093e0fa --- diff --git a/manifest b/manifest index c28c217ff1..b3a7209f04 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\s"sqlite3\s-sourceid"\scommand\sin\sthe\sTCL\sinterface.\s\sUse\sthat\scommand\sand\nothers\sto\soutput\sadditional\sinformation\sabout\sthe\stest\sconfiguration\sat\sthe\s\nconclusion\sof\sa\sTCL\stest. -D 2016-01-07T02:06:55.894 +C Small\sperformance\sand\ssize\soptimization\sspotted\swhile\sworking\son\sthe\nshared-cache\sproblem. +D 2016-01-07T17:09:43.631 F Makefile.in 7c8cc4c2f0179efc6fa9492141d1fb65f4807054 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc e45d8b9b56dfa3f2cd860b2c28bd9d304513b042 @@ -279,7 +279,7 @@ F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79 F src/btree.c 4d3452b2a3daf875490ac4f0a278da7f85fabe12 F src/btree.h 2d76dee44704c47eed323356a758662724b674a0 F src/btreeInt.h b5f2651b41808f038dee9282c5dc0232ce6532d3 -F src/build.c d8006e9030c61b9495d0b2f724edd3fcdae16930 +F src/build.c 9d497ff4bf3c82cecb520436e0e9963785627583 F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0 F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f F src/ctime.c 60e135af364d777a9ab41c97e5e89cd224da6198 @@ -322,7 +322,7 @@ F src/os_win.c 386fba30419e8458b13209781c2af5590eab2811 F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca F src/pager.c 58d2593612acb6b542de6715b4af397ea1fa0a35 F src/pager.h bf25005b4656cd805af43487c3139fca9678d0cc -F src/parse.y 23737e649c26ce327603799e57f5c2ff50e5e6ba +F src/parse.y caad1e98edeca6960493d0c60d31b76820dd7776 F src/pcache.c 73895411fa6b7bd6f0091212feabbe833b358d23 F src/pcache.h 1ff11adce609ba7de139b6abfabaf9a2bac947b5 F src/pcache1.c 72f644dc9e1468c72922eff5904048427b817051 @@ -338,7 +338,7 @@ F src/shell.c ed71dc7679e6f087a3f1ea3f9dae4b0fae7209c3 F src/sqlite.h.in 7d87d71b9a4689c51fa092f48f16590ff71558e3 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h dfbe62ffd95b99afe2140d8c35b180d11924072d -F src/sqliteInt.h f97614d43833bae0ed6c51ac8e550f0099a1d0ba +F src/sqliteInt.h 987b46b1d8089155caecbdb14b78850ae1e198ff F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 55a11fd627eaf046b3783622b2925399a50a65b4 -R 5876235b8965be95d77913e3f4573bf2 +P 4f80440bf566959306f6ca8cbb1fd29d138ee38b +R f265718df82e1345668e0777962739f6 U drh -Z dff9c340c358386729bbf7e0fd3fe53f +Z e6c791f6b7ef0a212def33d53e341994 diff --git a/manifest.uuid b/manifest.uuid index d73c6cc5df..64d2588352 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4f80440bf566959306f6ca8cbb1fd29d138ee38b \ No newline at end of file +828958ff77a5c239d55302f570077835c093e0fa \ No newline at end of file diff --git a/src/build.c b/src/build.c index 63e3004657..6aac454172 100644 --- a/src/build.c +++ b/src/build.c @@ -24,15 +24,6 @@ */ #include "sqliteInt.h" -/* -** This routine is called when a new SQL statement is beginning to -** be parsed. Initialize the pParse structure as needed. -*/ -void sqlite3BeginParse(Parse *pParse, int explainFlag){ - pParse->explain = (u8)explainFlag; - pParse->nVar = 0; -} - #ifndef SQLITE_OMIT_SHARED_CACHE /* ** The TableLock structure is only used by the sqlite3TableLock() and diff --git a/src/parse.y b/src/parse.y index 6ac2be21f2..d6a587a2c8 100644 --- a/src/parse.y +++ b/src/parse.y @@ -114,10 +114,10 @@ cmdlist ::= cmdlist ecmd. cmdlist ::= ecmd. ecmd ::= SEMI. ecmd ::= explain cmdx SEMI. -explain ::= . { sqlite3BeginParse(pParse, 0); } +explain ::= . %ifndef SQLITE_OMIT_EXPLAIN -explain ::= EXPLAIN. { sqlite3BeginParse(pParse, 1); } -explain ::= EXPLAIN QUERY PLAN. { sqlite3BeginParse(pParse, 2); } +explain ::= EXPLAIN. { pParse->explain = 1; } +explain ::= EXPLAIN QUERY PLAN. { pParse->explain = 2; } %endif SQLITE_OMIT_EXPLAIN cmdx ::= cmd. { sqlite3FinishCoding(pParse); } diff --git a/src/sqliteInt.h b/src/sqliteInt.h index c01bbc7869..0fbc7f6cc7 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3340,7 +3340,6 @@ void sqlite3Pragma(Parse*,Token*,Token*,Token*,int); void sqlite3ResetAllSchemasOfConnection(sqlite3*); void sqlite3ResetOneSchema(sqlite3*,int); void sqlite3CollapseDatabaseArray(sqlite3*); -void sqlite3BeginParse(Parse*,int); void sqlite3CommitInternalChanges(sqlite3*); void sqlite3DeleteColumnNames(sqlite3*,Table*); int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**);