]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove unnecessary OP_Close opcodes at the end of INSERT operations, resulting
authordrh <drh@noemail.net>
Mon, 21 Nov 2016 21:33:46 +0000 (21:33 +0000)
committerdrh <drh@noemail.net>
Mon, 21 Nov 2016 21:33:46 +0000 (21:33 +0000)
in smaller and faster code.

FossilOrigin-Name: abeddb6d5a4040e1d0a87a4f32ad79794ba0842b

manifest
manifest.uuid
src/insert.c

index 3840f7a7d08fc1a21f8465ea5a3e9ca04331d47d..cf92f6bee8726d24ae3336016814295b90a22a48 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Enhance\sspeedtest1.c\sso\sthat\sis\sworks\son\solder\sversions\sof\sSQLite,\sbefore\nthe\sintroduction\sof\sthe\sgroup_concat()\saggregate\sfunction.
-D 2016-11-21T18:15:35.996
+C Remove\sunnecessary\sOP_Close\sopcodes\sat\sthe\send\sof\sINSERT\soperations,\sresulting\nin\ssmaller\sand\sfaster\scode.
+D 2016-11-21T21:33:46.646
 F Makefile.in 6b572807415d3f0a379cebc9461416d8df4a12c8
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc bb4d970894abbbe0e88d00aac29bd52af8bc95f4
@@ -349,7 +349,7 @@ F src/hash.c 63d0ee752a3b92d4695b2b1f5259c4621b2cfebd
 F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
 F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da
 F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
-F src/insert.c 24a42864ae46e4448d15f3207af963a6452b611e
+F src/insert.c b07f929977f36d2279cc3bce41583e30881cb617
 F src/legacy.c 75d3023be8f0d2b99d60f905090341a03358c58e
 F src/loadext.c 5d6642d141c07d366e43d359e94ec9de47add41d
 F src/main.c 694ac90557abdaa62151a6090670e107b0f2c2ab
@@ -1534,7 +1534,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 b3b7b42d9a4a0e7e2be8b2933328a7bec2f49a81
-R 142d4e960b1bc74fe4e27f638486681b
+P 9979ba80a649ee61d9d174dc9d9fcab7e9fc1332
+R 92d61cb2d5bdcee0374dbd9c4ae6bd21
 U drh
-Z 46dbec5fea6f8ea94f3f3ff9f77bd1e2
+Z 31a59b2224bec36ffef21dc37a376954
index 9891c7c97a76a07d56b30b4120a1554a9a4defad..659aa4015df8d0afa455c863996715c33daaa3d0 100644 (file)
@@ -1 +1 @@
-9979ba80a649ee61d9d174dc9d9fcab7e9fc1332
\ No newline at end of file
+abeddb6d5a4040e1d0a87a4f32ad79794ba0842b
\ No newline at end of file
index 11b7221714d5cfe042506e1a6b940dbc93f185ba..bb9936f3f74128aec93cfeea124c1f2b3c8defb0 100644 (file)
@@ -485,7 +485,7 @@ void sqlite3Insert(
   sqlite3 *db;          /* The main database structure */
   Table *pTab;          /* The table to insert into.  aka TABLE */
   char *zTab;           /* Name of the table into which we are inserting */
-  int i, j, idx;        /* Loop counters */
+  int i, j;             /* Loop counters */
   Vdbe *v;              /* Generate code into this virtual machine */
   Index *pIdx;          /* For looping over indices of the table */
   int nColumn;          /* Number of columns in the data */
@@ -1045,14 +1045,6 @@ void sqlite3Insert(
     sqlite3VdbeJumpHere(v, addrInsTop);
   }
 
-  if( !IsVirtual(pTab) && !isView ){
-    /* Close all tables opened */
-    if( iDataCur<iIdxCur ) sqlite3VdbeAddOp1(v, OP_Close, iDataCur);
-    for(idx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, idx++){
-      sqlite3VdbeAddOp1(v, OP_Close, idx+iIdxCur);
-    }
-  }
-
 insert_end:
   /* Update the sqlite_sequence table by storing the content of the
   ** maximum rowid counter values recorded while inserting into