1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Simplification of the VDBE bytecode for incremental blob I/O.

FossilOrigin-Name: d23849f64a110e336f26282bf2b961a2a2372468
This commit is contained in:
drh
2016-01-18 00:46:11 +00:00
parent dad300d8e1
commit e617bc8c0c
3 changed files with 25 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\sproblem\swith\sSQLITE_TEST_REALLOC_STRESS. C Simplification\sof\sthe\sVDBE\sbytecode\sfor\sincremental\sblob\sI/O.
D 2016-01-18T00:20:26.450 D 2016-01-18T00:46:11.199
F Makefile.in a476545d0c8626224d0bacac85c6e2967474af81 F Makefile.in a476545d0c8626224d0bacac85c6e2967474af81
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 01e855f958932d0d3ed62ec675fc63e2cef61fcb F Makefile.msc 01e855f958932d0d3ed62ec675fc63e2cef61fcb
@@ -413,7 +413,7 @@ F src/vdbe.h 7a733ea8aac1b77305a67698e784fa3484ee3337
F src/vdbeInt.h 42eefa4f9e7432b9968d321b44e48821ec13b189 F src/vdbeInt.h 42eefa4f9e7432b9968d321b44e48821ec13b189
F src/vdbeapi.c ffae8f5af4570fbd548504e815e9fb7227f0822e F src/vdbeapi.c ffae8f5af4570fbd548504e815e9fb7227f0822e
F src/vdbeaux.c 95e067a5e2a75e128d45ca597388dc83c58142f0 F src/vdbeaux.c 95e067a5e2a75e128d45ca597388dc83c58142f0
F src/vdbeblob.c 8542f282b58293bd61c2ea4b2125f250f4fc9543 F src/vdbeblob.c 37c3d11a753e403698c69e17383d282e1ae73e75
F src/vdbemem.c b9181e77eca2a095929d46250daf85c8d2621fc0 F src/vdbemem.c b9181e77eca2a095929d46250daf85c8d2621fc0
F src/vdbesort.c 0971557e5d3c289e46f56a52aed2197c13251de7 F src/vdbesort.c 0971557e5d3c289e46f56a52aed2197c13251de7
F src/vdbetrace.c 8befe829faff6d9e6f6e4dee5a7d3f85cc85f1a0 F src/vdbetrace.c 8befe829faff6d9e6f6e4dee5a7d3f85cc85f1a0
@@ -1417,7 +1417,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 61deab043dcea860070dba6b02601a7de627fff1 P 0aaf3febb00f622c5ef0853b2491d69f7ca7a21e
R 4379f64b4cb45ea0db7a5f863224d3f6 R 8210381425f8a73bf29afce4a64c9930
U drh U drh
Z e0f8e155ee8f1f04cd4cfaa23a1af003 Z 0317022cefd345ebef2be02c7eb84046

View File

@@ -1 +1 @@
0aaf3febb00f622c5ef0853b2491d69f7ca7a21e d23849f64a110e336f26282bf2b961a2a2372468

View File

@@ -249,19 +249,19 @@ int sqlite3_blob_open(
** which closes the b-tree cursor and (possibly) commits the ** which closes the b-tree cursor and (possibly) commits the
** transaction. ** transaction.
*/ */
static const int iLn = VDBE_OFFSET_LINENO(3); static const int iLn = VDBE_OFFSET_LINENO(4);
static const VdbeOpList openBlob[] = { static const VdbeOpList openBlob[] = {
/* {OP_Transaction, 0, 0, 0}, // inserted separately */ /* addr/ofst */
{OP_TableLock, 0, 0, 0}, /* 0: Acquire a read or write lock */ /* {OP_Transaction, 0, 0, 0}, // 0/ inserted separately */
{OP_OpenRead, 0, 0, 0}, /* 1: Open cursor 0 for reading */ {OP_TableLock, 0, 0, 0}, /* 1/0: Acquire a read or write lock */
{OP_OpenWrite, 0, 0, 0}, /* 2: Open cursor 0 for read/write */ {OP_OpenRead, 0, 0, 0}, /* 2/1: Open a cursor */
{OP_Variable, 1, 1, 1}, /* 3: Push the rowid to the stack */ {OP_Variable, 1, 1, 0}, /* 3/2: Move ?1 into reg[1] */
{OP_NotExists, 0, 10, 1}, /* 4: Seek the cursor */ {OP_NotExists, 0, 8, 1}, /* 4/3: Seek the cursor */
{OP_Column, 0, 0, 1}, /* 5 */ {OP_Column, 0, 0, 1}, /* 5/4 */
{OP_ResultRow, 1, 0, 0}, /* 6 */ {OP_ResultRow, 1, 0, 0}, /* 6/5 */
{OP_Goto, 0, 4, 0}, /* 7 */ {OP_Goto, 0, 3, 0}, /* 7/6 */
{OP_Close, 0, 0, 0}, /* 8 */ {OP_Close, 0, 0, 0}, /* 8/7 */
{OP_Halt, 0, 0, 0}, /* 9 */ {OP_Halt, 0, 0, 0}, /* 9/8 */
}; };
Vdbe *v = (Vdbe *)pBlob->pStmt; Vdbe *v = (Vdbe *)pBlob->pStmt;
int iDb = sqlite3SchemaToIndex(db, pTab->pSchema); int iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
@@ -292,9 +292,9 @@ int sqlite3_blob_open(
/* Remove either the OP_OpenWrite or OpenRead. Set the P2 /* Remove either the OP_OpenWrite or OpenRead. Set the P2
** parameter of the other to pTab->tnum. */ ** parameter of the other to pTab->tnum. */
aOp[2-flags].opcode = OP_Noop; if( flags ) aOp[1].opcode = OP_OpenWrite;
aOp[1+flags].p2 = pTab->tnum; aOp[1].p2 = pTab->tnum;
aOp[1+flags].p3 = iDb; aOp[1].p3 = iDb;
/* Configure the number of columns. Configure the cursor to /* Configure the number of columns. Configure the cursor to
** think that the table has one more column than it really ** think that the table has one more column than it really
@@ -303,9 +303,9 @@ int sqlite3_blob_open(
** we can invoke OP_Column to fill in the vdbe cursors type ** we can invoke OP_Column to fill in the vdbe cursors type
** and offset cache without causing any IO. ** and offset cache without causing any IO.
*/ */
aOp[1+flags].p4type = P4_INT32; aOp[1].p4type = P4_INT32;
aOp[1+flags].p4.i = pTab->nCol+1; aOp[1].p4.i = pTab->nCol+1;
aOp[5].p2 = pTab->nCol; aOp[4].p2 = pTab->nCol;
pParse->nVar = 1; pParse->nVar = 1;
pParse->nMem = 1; pParse->nMem = 1;